Reputation: 3
I was wondering how do you use the cut, sort, and uniq commands in a pipeline and give a command line that indicates how many users are using each of the shells mentioned in /etc/passwd? i'm not sure if this is right but
cut -f1 -d':' /etc/passwd | sort -n | uniq
?
Upvotes: 0
Views: 1143
Reputation: 19375
Summarizing the answers excruciatingly hidden in comments:
You were close, only
-n
is uselessuniq -c
That gives
cut -f7 -d: /etc/passwd | sort | uniq -c
Upvotes: 1