Showing posts with label translation. Show all posts
Showing posts with label translation. Show all posts

Thursday, September 4, 2008

CASE TRANSLATION

If you have occasion whereyou need to translate uppercase to lower and viceversa, and happen to run aksh, enter the following functions into your .bash_profile:

trans ()
{
tr '[:upper:]' '[:lower:]' < $1 > $2
}
TRANS()
{
tr '[:lower:]' '[:upper:]' <$1 > $2
}
The first function trans will translate all uppercaseletters in the first file(argument) to lowercase in the second file.
The second function TRANS does the exact opposite.