I have a file, consisting of a column of numbers, some of which are the same, I
want to count the occurrences of each unique number, here is the simple way:
cat filename | sort | uniq -c
Be sure that the numbers are in a column.
时间: 2024-10-17 17:51:50