cut
, sort
, and uniq
. e.g. cut -d ';' -f2,3 --output-delimiter=$'\t' input.csv | sort | uniq -c
. Without GNU cut
, you could use sed
between cut
and sort
to change the semi-colons to tabs - cut -d ';' -f2,3 input.csv | sed -e 's/;/\t/g' | sort | uniq -c