A few people have noted several problems with the sort command. I apologize for the problems. There are several differences between the sort included with Mac and that on Linux (and I think on cygwin, but I am not sure).
- Linux sort has a random option, -R, which is necessary for question 6. If you are working on a Mac, you can go ahead and pretend that the option is there in your answer. I will not take off any points for not figuring this out.
- The textbook uses an older way of specifying fields (columns) for sort, using +. The preferred way is to use the -k option, as I have done in the examples in class. I am 99% certain that the -k option works in both Mac and Linux (and cygwin).
Again, I apologize for the confusion.