I had a bunch of hostnames in a text file, but some were uppercase and some lowercase. This presents problems when searching and automating tasks, so I wanted a way to convert them all into lowercase as all text should be in Linux.
Here we are using “tr” to completed this task.
1 |
tr '[:upper:]' '[:lower:]' < input.txt > output.txt |