summaryrefslogtreecommitdiff
path: root/textd
diff options
context:
space:
mode:
Diffstat (limited to 'textd')
-rwxr-xr-xtextd7
1 files changed, 4 insertions, 3 deletions
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