September 4, 2009 · News, homework

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).

  1. 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.
  2. 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.

Written by Robert Felty


Leave a Reply

You must be logged in to post a comment.

Subscribe without commenting