How do I convert text in a file to lower case?

Converting the content of a file to lowercase a simple process using ‘tr’

cat input.txt | tr ‘[:upper:]‘ ‘[:lower:]‘ > output.txt

Remember the input.txt and output.txt can not be the same file.

To change a file to all uppercase just swap upper and lower.

You cannot comment on this entry