summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--chr.sh10
1 files changed, 7 insertions, 3 deletions
diff --git a/chr.sh b/chr.sh
index ecc1a54..3759eff 100644
--- a/chr.sh
+++ b/chr.sh
@@ -1,6 +1,10 @@
-if [ $# -ne 1 ]; then
- printf 'usage: %s number\n' "$0"
+if [ $# -eq 0 ]; then
+ printf 'usage: %s number...\n' "$0"
exit 1
fi
-printf '%b\n' "\\0$(printf '%o' "$1")"
+while [ $# -gt 0 ]; do
+ printf '%b' "\\0$(printf '%o' "$1")"
+ shift
+done
+printf '\n'