diff options
author | Haoran S. Diao (刁浩然) <0@hairydiode.xyz> | 2023-06-30 03:24:31 -0700 |
---|---|---|
committer | Haoran S. Diao (刁浩然) <0@hairydiode.xyz> | 2023-06-30 03:24:31 -0700 |
commit | a2e390f8e2348dded6650785c0bba60749903535 (patch) | |
tree | ae7865f589c1b2e33c6c51f0299ebfa2e504b20f /textd | |
parent | ec1d430daf529802729aa1ab622ad1a2d7c53cd3 (diff) |
surpressed bc error
Diffstat (limited to 'textd')
-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 |