Talk:Ad Hoc Data Analysis From The Unix Command Line/Counting Part 2 - sort and uniq

= histogram =

Histograms are very important. What is a good example for histograms where neighboring values are put in the same bucket? Ideally buckets would be equal-count (not equal-size).

Jlaidman (discuss • contribs) 22:15, 23 April 2016 (UTC) These aren't histograms, they are tables. A(n) histogram is a graph of such a table, like so:

To make a histogram, use something like this:

(Taken from https://unix.stackexchange.com/a/178153/91910)

= sort =

The "sort the csv" file example fails if the csv includes quoted text with embedded commas.

My favorite sort idiom is usually

sort | uniq -c | sort -n