Back to labs/answer key page

tr ' ' '\012' < daffodils | sort | uniq -c | sort -nr | less

The -n option tells sort to sort using numeric (as opposed to ascii) order. The -r option tells sort to reverse the order. Piping the output through less means that we see it one screenful at a time.

Back to labs/answer key page

-----

Emily M. Bender
Last modified: Fri Dec 8 12:04:43 2000