Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in Linux by (18.4k points)
edited by
I read many tutorials on the web about the usage of the 'tr' command. However, I am not able to understand how to encrypt the email address with the shell script shifts characters using the rot13. Can anyone give the link or an example?

1 Answer

0 votes
by (36.8k points)

Not sure exactly how you want to use, but here's the basic example to get you started:

echo '[email protected]' | tr 'A-Za-z' 'N-ZA-Mn-za-m'

To make it easier, you can alias a tr command in the .bashrc file thusly:

alias rot13="tr 'A-Za-z' 'N-ZA-Mn-za-m'"

Now you can call:

echo '[email protected]' | rot13

Want to be a Linux expert? Come and join this Linux course

 

Related questions

Browse Categories

...