Back to labs/answer key page

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

uniq removes duplicate lines, but only if they occur right next to each other. The -c option counts how many there were.

Back to labs/answer key page

-----

Emily M. Bender
Last modified: Fri Dec 8 11:57:15 2000