Home > linux > How To: convert uppercase to lowercase in a file

How To: convert uppercase to lowercase in a file

There are many scripts available to quickly convert uppercase file names to lowercase but not too many to convert content of a file from uppercase to lowercase or lowercase to uppercase.

Here is how to convert from upper to lowercase:

$ tr '[:upper:]' '[:lower:]' < input_file.txt > output_file.txt

To convert from lowercase to uppercase:

$ tr '[:lower:]' '[:upper:]' < input_file.txt > output_file.txt

Done!

Categories: linux Tags: