Wednesday, October 12, 2011

Converting a file from uppercase to lowercase and vice-versa


Syntax to convert Upper to lowercase:
# dd if=[file with uppercase] of=[output filename] conv=lcase
[or]
# cat [file with uppercase] | tr '[:upper:]' '[:lower:]'  > output_file

Syntax to convert Lower to uppercase:
# dd if=[file with lowercase] of=[output filename] conv=ucase
[or]
# cat [file with lowercase] | tr '[:lower:]' '[:upper:]'  > output_file