summaryrefslogtreecommitdiff
path: root/bin/double-strike
diff options
context:
space:
mode:
Diffstat (limited to 'bin/double-strike')
-rwxr-xr-xbin/double-strike14
1 files changed, 4 insertions, 10 deletions
diff --git a/bin/double-strike b/bin/double-strike
index 92e979d..0945542 100755
--- a/bin/double-strike
+++ b/bin/double-strike
@@ -67,15 +67,9 @@ declare -A ds=(
)
while IFS= read -r line
-do
- replacement=""
- for i in $(seq 0 "$((${#line}-1))")
- do
- c1=${line:$i:1}
- if [[ $c1 =~ [0-9a-zA-Z] ]]
- then replacement+=${ds[$c1]}
- else replacement+=$c1
- fi
+do for i in $(seq 0 "$((${#line}-1))")
+ do c=${line:$i:1}
+ printf '%s' "${ds[$c]:-$c}"
done
- echo "$replacement"
+ echo
done