Intro to Tech : Linux Commands
1 min readAug 27, 2016
- Create three text files, file1.txt, file2.txt and file3.txt using the touch command. Example: $ touch file1.txt
- Insert lines of text into file1.txt. The text is uppercase. Example
- Sort the text in file1.txt using the sort command. Write the output to file2.txt. Example: $ sort < file1.txt >file2.txt
- Convert the text in file2.txt into lowercase and write the output to file3.txt using the command below. Example: $ tr [:upper:] [:lower:] < file2.txt > file3.txt
- Confirm the output has been written to file3.txt by using cat command. Example: cat file3.txt
Checking for the differences between files.
Get Neville Masheti’s stories in your inbox
Join Medium for free to get updates from this writer.
6.Use the diff command followed by the first file then second file. Example
$ diff file1.txt file3.txt



