~ubuntu-branches/ubuntu/trusty/abs-guide/trusty-proposed

« back to all changes in this revision

Viewing changes to abs/rot13a.sh

  • Committer: Package Import Robot
  • Author(s): Sandro Tosi
  • Date: 2012-06-03 10:57:27 UTC
  • mfrom: (1.2.6)
  • Revision ID: package-import@ubuntu.com-20120603105727-rm7frl4feikr2swm
Tags: 6.5-1
* New upstream release
* debian/watch
  - updated
* debian/abs-guide.lintian-overrides
  - updated for new upstream code
* debian/control
  - bump Standards-Version to 3.9.3 (no changes needed)

Show diffs side-by-side

added added

removed removed

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