Sunday, July 31, 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
# 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
# cat [file with lowercase] | tr '[:lower:]' '[:upper:]'  > output_file

No comments:

Post a Comment