sort filenameThe sort command orders the lines of a file lexicographically (i.e. dictionary order). For example, if you type:
sort lab2data.txt(assuming that you named the data file from Lab 2 as above), you will see all lines of the lab2_data.txt scroll by, sorted as they would be in the dictionary.
sort -u filenameAn option to the sort command is the -u ("unique") option that will sort the lines of the file, and then filters outs duplicate lines. So, the output has only a unique, or single copy of each line from the original file.
ls | sortWhat does the above command do? How does the output change if you add the "-u" option?
sort lab2data.txt | wc -lWhat does the above command do? How does the output change if you add the "-u" option?
Remember to pick up any files you sent to the printer and to take any personal belongings. It is difficult to get back into the lab later (since it's locked when not in use), so, it's worth making sure you haven't forgotten anything.