2
# rot13a.sh: Same as "rot13.sh" script, but writes output to "secure" file.
4
# Usage: ./rot13a.sh filename
5
# or ./rot13a.sh <filename
6
# or ./rot13a.sh and supply keyboard input (stdin)
8
umask 177 # File creation mask.
9
# Files created by this script
10
#+ will have 600 permissions.
12
OUTFILE=decrypted.txt # Results output to file "decrypted.txt"
13
#+ which can only be read/written
14
# by invoker of script (or root).
16
cat "$@" | tr 'a-zA-Z' 'n-za-mN-ZA-M' > $OUTFILE
17
# ^^ Input from stdin or a file. ^^^^^^^^^^ Output redirected to file.