[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: rot13
In article <1995Feb7.204925.1@vaxc.stevens-tech.edu>,
<khorster@vaxc.stevens-tech.edu> wrote:
> Is there a stand alone rot13 decoder for the Apple //?
Don't know if this qualifies as "stand alone" since it requires a shell
of some (gno) sort. I have not tried it with gno, however, it works
fine on my unix box. You will have to modify it quite a bit since gno
doesn't have any of the test constructs of ksh (or almost any shell
I've ever heard of) e.g., just have the tr and the mv
Kind Regards,
Joe Walters att!nwsrs!bird NW 31K14 (708) 224-7189
To know, and not to do, is not yet to know.
$ cat unrot
USAGE="
Usage $0 filename [ filename ] ...
$0 puts filename through a tr that undoes the effect of rotating."
if [ $# = 0 ]
then
echo "$USAGE"
exit 2
fi
t1=/usr/tmp/t1$$
for file in $*
do
if [ -f "$1" ]
then
cat $1 |
tr '[a-m][n-z][A-M][N-Z]' '[n-z][a-m][N-Z][A-M]' > $t1
mv $t1 $1
else
echo "Wake up and smell the roses!"
echo "No such file named $1\007\007\007"
fi
shift
done
[ -f "$t1" ] && rm $t1
--
Joe Walters att!nwsrs!bird NW 31K14 (708) 224-7189
To know, and not to do, is not yet to know.
- References:
- rot13
- From: khorster@vaxc.stevens-tech.edu