You can do this in a different way (since bash appears to ignore escaped backslashes around the u in "\u"):
#!/bin/bash
X=0
while [ $X -lt 65536 ]; do
    HEX=$(bc <<< "obase=16; $X")
    HEX="0x${HEX}"
    UCODENAME=$(printf "%0*x\n" 4 $HEX)
    UCODECHAR="\\u$(printf "%0*x" 4 $HEX)"
    echo -e "Unicode ${UCODENAME} = ${UCODECHAR}"
    X=$((X + 1))
done
though of course, the script is still bash-specific. A few other comments:
-  most people would suggest using $( and)` and)rather than back-tics.
-  bash's printfcan print Unicode directly (no need for the echo).
-  the extra printfforUCODECHARis redundant
Eliminating the redundancy:
#!/bin/bash
X=0
while [ $X -lt 65536 ]; do
    HEX=$(bc <<< "obase=16; $X")
    HEX="0x${HEX}"
    UCODENAME=$(printf "%0*x\n" 4 $HEX)
    UCODECHAR="\\u${UCODENAME}"
    echo -e "Unicode ${UCODENAME} = ${UCODECHAR}"
    X=$((X + 1))
done
 
                 
                 
                