Skip to content

Instantly share code, notes, and snippets.

@jsarenik jsarenik/
Last active Aug 11, 2016

What would you like to do?
Caesar cipher in POSIX shell using cut and tr
B=$(echo $A | cut -b${KEY}- | tr -d '\n'; echo $A | cut -b-$[KEY-1])
AU=$(echo $A | tr '[a-z]' '[A-Z]')
BU=$(echo $B | tr '[a-z]' '[A-Z]')
tr "[${A}${AU}]" "[${B}${BU}]"

This comment has been minimized.

Copy link
Owner Author

commented Aug 11, 2016

$ sh 7
GNUP zummr.ius
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.