[英]How to use cut and awk commands to extract text input in a tabular format?
[英]how to use sort, cut, and unique commands in pipe
我想知道您如何在管道中使用cut,sort和uniq命令,並提供一個命令行,指示有多少用戶正在使用/ etc / passwd中提到的每個shell? 我不確定這是否正確,但
cut -f1 -d':' /etc/passwd | sort -n | uniq
?
總結隱藏在評論中的令人難以置信的答案:
你很親近
-n
是無用的 uniq -c
那給
cut -f7 -d: /etc/passwd | sort | uniq -c
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.