diff options
-rwxr-xr-x | textd | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -5,9 +5,10 @@ # in DIR # assumes unicode utf-8 input codes=$(iconv -f utf8 -t utf32be | xxd -u -p -c 4) -#convert to decimal -dec=$(echo -n "ibase=16;$codes" | bc) +#convert to decimal, must replace ' ' with ';' first +dec=$(echo -n "ibase=16;$codes" | bc 2>/dev/null) +#converts space/newline delimited string to array dec=($dec) for decimal_code in "${dec[@]}"; do - ./fontd "$decimal_code" "$1" + fontd "$decimal_code" "$1" done |