uniq
Original author(s) | Ken Thompson (AT&T Bell Laboratories) |
---|---|
Developer(s) | Various open-source and commercial developers |
Initial release | February 1973 |
Operating system | Unix, Unix-like, Plan 9, Inferno, MSX-DOS, IBM i |
Platform | Cross-platform |
Type | Command |
License | coreutils: GPLv3+ |
Website | man7 |
uniq
는 유닉스, Plan 9, Inferno, 및 유닉스-계열 운영 시스템에서 유틸리티 명령으로, 텍스트 파일 또는 STDIN을 입력될 때, 인접한 동일한 줄이 하나의 고유한 텍스트 줄로 축소된 텍스트를 출력합니다.
Overview
그 명령은 일종의 필터 프로그램입니다. 일반적으로 그것은 sort
후에 사용됩니다. 그것은 역시 중복 행만 출력하거나 (-d
옵션 사용), 각 행의 발생 횟수를 추가 (-c
옵션 사용)할 수 있습니다. 예를 들어, 다음 명령은 파일에서 고유한 행을 각각 발생 횟수별로 정렬하여 나열합니다:
$ sort file | uniq -c | sort -n
이와 같이 uniq
를 사용하는 것은 쉘 스크립트에서 파이프라인을 구축할 때 공통적입니다.
History
버전 3 유닉스에서 처음 등장한,[1] uniq
는 이제 다양한 다른 유닉스와 유닉스-계열 운영 시스템에서 사용할 수 있습니다. 그것은 1987년 2호부터 X/Open 이식성 안내서의 일부입니다. 그것은 POSIX의 첫 번째 버전과 단일 유닉스 사양으로 상속되었습니다.[2]
GNU coreutils에 번들된 버전은 Richard Stallman과 David MacKenzie에 의해 작성되었습니다.[3]
uniq
명령은 역시 MSX-DOS 버전 2에 대해 ASCII의 MSX-DOS2 도구의 일부입니다.[4]
그 명령은 GnuWin32 프로젝트의 일부로 Microsoft Windows에 대해 별도 패키지로 사용할 수 있고[5] 공통적인 GNU 유닉스-계열 유틸리티의 네이티브 Win32 포트의 UnxUtils 모음입니다.[6]
uniq 명령은 역시 IBM i 운영 시스템에 이식되었습니다.[7]
See also
References
- ^ McIlroy, M. D. (1987). A Research Unix reader: annotated excerpts from the Programmer's Manual, 1971–1986 (PDF) (Technical report). CSTR. Bell Labs. 139.
- ^ The Single UNIX Specification, Issue 7 from The Open Group – Commands & Utilities Reference,
- ^ Linux General Commands Manual –
- ^ MSX-DOS2 Tools User's Manual by ASCII Corporation
- ^ CoreUtils for Windows
- ^ Native Win32 ports of some GNU utilities
- ^ IBM. "IBM System i Version 7.2 Programming Qshell" (PDF). Retrieved 2020-09-05.
{{cite web}}
: CS1 maint: url-status (link)
External links
![](https://upload.wikimedia.org/wikipedia/commons/thumb/d/df/Wikibooks-logo-en-noslogan.svg/40px-Wikibooks-logo-en-noslogan.svg.png)
- Linux User's Manual – User Commands –
- Plan 9 Programmer's Manual, Volume 1 –
- Inferno General commands Manual –
- SourceForge UnxUtils – Port of several GNU utilities to Windows