Embedding ROT13 encoding in a shell script

If you completed the steps in the previous section, you might have noticed that you did a lot of typing. And, goodness, if you made it through steps 3 and 5, your fingers are probably on strike right about now. If you plan to encode or decode with ROT13 frequently, consider embedding the sed commands in a shell script to avoid retyping them each time you encode or decode text, as shown in Figure 16.7. You might refer back to Chapter 10 for details on shell scripts before you get started here.

Figure 16.7. A brief shell script makes ROT13 as easy as, well, EBG13.

To create a ROT13 shell script:

1. ...

Get Unix: Visual QuickStart Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.