Dave's Brain

Browse - Computer Tips - Can a shell script do rot13 "encryption" ?

Date: 2011apr5
OS: Linux

Q.  Can a shell script do rot13 "encryption" ?

A.  Yes, like this:

#!/bin/sh exec tr 'a-zA-Z' 'n-za-mN-ZA-M'
Save it as /usr/local/bin/rot13 and do:
chmod a+x /usr/local/bin/rot13
Use it like this:
echo hello | rot13

Add a comment

Sign in to add a comment
Copyright © 2008-2018, dave - Code samples on Dave's Brain is licensed under the Creative Commons Attribution 2.5 License. However other material, including English text has all rights reserved.