uniq
Original author(s) | Ken Thompson |
---|---|
Developer(s) | AT&T Bell Laboratories |
Initial release | February 1973 |
Operating system | Unix and Unix-like, MSX-DOS |
Type | Command |
License | GNU GPL v3 |
Website | http://man7.org/linux/man-pages/man1/uniq.1.html |
Overview[edit]
It can also output only the duplicate lines (with the
-d
option), 它還可以僅輸出重複的行(帶-d
選項)
or add the number of occurrences of each line (with the
-c
option). 或增加每行的出現次數(帶-c
選項)。
An example: To see the list of lines in a file, sorted by the number of times each occurs:
一個示例:要查看文件中的行列表,按行出現的次數排序:
Using uniq like this is common when building pipelines in shell scripts.
沒有留言:
張貼留言