Created
April 27, 2022 06:03
-
-
Save cwfoo/4b0cef73d5a430140193a8f5bae50f16 to your computer and use it in GitHub Desktop.
The ROT13 substitution cipher
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# The ROT13 substitution cipher. | |
[ "$#" -ne 1 ] && printf 'usage: rot13 string\n' && exit 1 | |
printf '%s\n' "$1" | LC_ALL=C tr 'A-Za-z' 'N-ZA-Mn-za-m' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment