-c, --count
Prefix lines by the number of occurrences.
An option of uniqx.
Usage
uniqx -c [INPUT [OUTPUT]]
uniqx --count [INPUT [OUTPUT]]Details
| Short | Long | Value | Default | Meaning |
|---|---|---|---|---|
-c | --count | none | prefix lines by the number of occurrences |
Examples
Users report errors from your web server: see how its responses split between status codes, drawn as a histogram on the terminal
cutx -d' ' -f9 access.log | sortx | uniqx -cCount the occurrences of each line
uniqx -c sorted.txtDeduplicate in the portable gnux shell
gnux shell -c 'catx sorted.txt | uniqx -c'Help in the terminal
gnux help uniqx --count