From 18dcd20ef93e2e1e138ffc1ac6056758e164c025 Mon Sep 17 00:00:00 2001 From: DrNuget Date: Sat, 15 Nov 2025 02:49:36 +0200 Subject: ROT make script not omit non alphabet characters --- scripts/rot | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/scripts/rot b/scripts/rot index 627ef62..aae6ec8 100755 --- a/scripts/rot +++ b/scripts/rot @@ -11,7 +11,7 @@ while [ $# -gt 0 ]; do shift ;; *) - DATA="$DATA$1" + DATA="$DATA $1" shift ;; esac @@ -37,7 +37,12 @@ BEGIN { result=""; split($0, chars, ""); for (i=1;i<=length($0);i++) { - result=result cipher_map[chars[i]]; + if (chars[i] in cipher_map) { + result=result cipher_map[chars[i]]; + } + else { + result=result chars[i]; + } } print result; } -- cgit v1.2.3