You are not logged in.
I am writing a program for arch linux and I need to understand what is going on with the uniq command and my file.
File: https://www.toptal.com/developers/haste … uhoqi.yaml
My command of script:
cat file | uniq -cd
output:
4 WAIT
I can't figure out what the problem is please help
Offline
sort file | uniq -cd
Offline
Also, as there is only one thing repeated, if you actually know what it will be beforehand just use grep:
grep -c WAIT file
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
man uniq
"Note: 'uniq' does not detect repeated lines unless they are adjacent. You may want to sort the input first, or use 'sort -u' without 'uniq'."
Offline