From a2e390f8e2348dded6650785c0bba60749903535 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Haoran=20S=2E=20Diao=20=28=E5=88=81=E6=B5=A9=E7=84=B6=29?= <0@hairydiode.xyz> Date: Fri, 30 Jun 2023 03:24:31 -0700 Subject: surpressed bc error --- textd | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'textd') diff --git a/textd b/textd index 57394a0..b4f4683 100755 --- a/textd +++ b/textd @@ -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 -- cgit v1.1