Skip to content

Instantly share code, notes, and snippets.

@hannic
Last active January 18, 2023 04:17
Show Gist options
  • Save hannic/4111757 to your computer and use it in GitHub Desktop.
Save hannic/4111757 to your computer and use it in GitHub Desktop.
ROT13/ROT47 is an example of the Caesar cipher, developed in ancient Rome. Unix command. tr transliterate
# encode
tr 'A-Za-z' 'N-ZA-Mn-za-m' <<<"The Quick Brown Fox Jumps Over The Lazy Dog"
# decode
echo "Gur Dhvpx Oebja Sbk Whzcf Bire Gur Ynml Qbt" | tr '[A-Za-z]' '[N-ZA-Mn-za-m]'
$ tr '\!-~' 'P-~\!-O' <<<"The Quick Brown Fox Jumps Over The Lazy Dog"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment