![]() ![]() n is to iterate over filename arguments and -p to print lines afterwards, same as adding print to the expression would do. to replace âaâ with âbâ and so forth: perl -npe 'tr/abcdefghijklmnopqrstuvwxyz/bcdefghijklmnopqrstuvwxyza/' Has an easy-to-use transliterator tool called tr, e.g. $ ![]() to replace âaâ with âbâ and so forth: sed 'y/abcdefghijklmnopqrstuvwxyz/bcdefghijklmnopqrstuvwxyza/' In your case it would be: tr '' '' < fileĪlso from another source to decode (reverse the order of patterns to encode): ROT-3 = tr 'd-za-cD-ZA-C' 'a-zA-Z'Ĭan do that with the transform command y/â¦/â¦/, e.g. $ echo "GUR DHVPX OEBJA SBK WHZCF BIRE GUR YNML QBT" | tr '' '' GUR DHVPX OEBJA SBK WHZCF BIRE GUR YNML QBT It can also be adjusted to ROT13 instead: $ echo "THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG" | tr '' '' THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG QEB NRFZH YOLTK CLU GRJMP LSBO QEB IXWV ALDĬaesar cipher decoding: $ echo "QEB NRFZH YOLTK CLU GRJMP LSBO QEB IXWV ALD" | tr '' '' Note that the commands are case sensitive.Ĭaesar cipher encoding: $ echo "THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG" | tr '' ''.A search for "ROT cypher Bash" leads me to caesar-cipher.sh. ![]()
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |