![]() |
Translating upper and lowercase
Hey there I was wondering how to make it so that whenever someone enters a variable that i can have that variable universal so I dont have to worry about "RANDOM" or "random" being entered and they're both read the same way.
I remember seeing a simple tr [:upper:] [:lower:] command, or something like that, but I can't find an example or explanation of the statement anywhere. Anyway, help is always appreciated. Thanks for the time spent reading this. |
tr a-z A-Z, without the classes. Standard input to standard output, so sandwich it in there.
|
On a POSIX-compliant unix, tr supports POSIX classes -- those [:upper:] things.
:
echo "enter a word \c" |
| All times are GMT -5. The time now is 3:53 PM. |
Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC