UNIX GURU UNIVERSE
UNIX HOT TIP
Unix Tip 3499 - September 8, 2011
http://www.ugu.com/sui/ugu/show?tip.today
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
ROTATE THE ALPHABET
Rot13 simply rotates any
alphabet characters but 13
places, so the letter 'a'
becomes a letter 'n', and
an 'x' becomes a 'k' etc...
To encode a file type:
% rot13 <filename>
And repeat to decode.
(Note original file is
overwritten by encrypted
version.)
Simply create this small
script, and save with the
filename of 'rot13'
remembering to set
appropriate permissions.
#!/usr/local/bin/bash
tr '[a-m][n-z][A-M][N-Z]' '[n-z][a-m][N-Z][A-M]' < $1 1>temp1;
mv temp1 $1;
This tip generously supported by: dan.mcgrath@virginmobile.com
--------------------------------------------------------------------------
To Subscribe: http://www.ugu.com/sui/ugu/show?tip.subscribe
To Unsubscribe: http://www.ugu.com/sui/ugu/show?tip.unsubscribe
To Submit A Tip: http://www.ugu.com/sui/ugu/show?tip.today
==========================================================================
DISCLAIMER: All UNIX HOT TIPS ARE OWNED BY THE UNIX GURU UNIVERSE AND ARE
NOT TO BE SOLD, PRINTED OR USED WITHOUT THE WRITTEN CONSENT OF THE UNIX
GURU UNIVERSE. ALL TIPS ARE "USE AT YOUR OWN RISK". UGU ADVISES THAT
ALL TIPS BE TESTED IN A NON-PRODUCTION DEVELOPMENT ENVIRONMENT FIRST.
Unix Guru Universe - www.ugu.com - tips@ugu.com - Copyright 1994-2001
==========================================================================
Tidak ada komentar:
Posting Komentar