Given a text file we can convert content in it to upper case or lower case. Following are some ways to achieve it.
To upper case conversion:
With dd:
$ dd if=input.txt of=output.txt conv=ucase
With tr:
$ tr '[:lower:]' '[:upper:]' < input.txt > output.txt
To lower case conversion:
With dd:
$ dd if=input.txt of=output.txt conv=lcase
With tr:
$ tr '[:upper:]' '[:lower:]' < input.txt > output.txt
Advertisements
Pingback: Ubah isi file jadi lowercase atau uppercase « NurHidayat dot net