in reply to one liner to print out sorted list of word
For that matter, you don't need uniq as a separate process:perl -ne ... | sort | uniq
and of course, your perl one-line could do everything:perl -ne ... | sort -u
For that matter, you could also modify that slightly to print uniq words with their frequencies of occurrence (by including the values of %u along with the keys), which is also handy.perl -ne 's/\W+/ /g; for $w (split){$u{$w}++} END{print join $/,sort k +eys %u,""}'
|
|---|