UPPERCASE to lowercase command?
Is there a bash command to convert a word that contains a couple of uppercase letters to an all lowercase letters word?
Like converting "TeSt" to "test" Maybe 'sed' or 'tr' ??? |
yep tr will do it fine, there are at least three examples of case converting in the info documentation for tr.
you could do it in sed but not easily. |
Did you do man tr at all?????
$ echo "TesT" | tr [:upper:] [:lower:] test Or using sed $echo "TesT" | sed 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/' TEST |
You can use awk. Just pipe your string into:
awk {'print tolower($_)'} eg: echo TeSt | awk {'print tolower($_)'} |
linux@linux:~> echo TeSt |sed 's/\(.*\)/\L\1/'
test |
All times are GMT -5. The time now is 11:33 AM. |