Jump to content

uniq

This is a fully translated article. Click here for more information.
From DawoumWiki, the free Mathematics self-learning

uniq
Original author(s)Ken Thompson
(AT&T Bell Laboratories)
Developer(s)Various open-source and commercial developers
Initial releaseFebruary 1973; 51 years ago (1973-02)
Operating systemUnix, Unix-like, Plan 9, Inferno, MSX-DOS, IBM i
PlatformCross-platform
TypeCommand
Licensecoreutils: GPLv3+
Websiteman7.org/linux/man-pages/man1/uniq.1.html

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에 대해 ASCIIMSX-DOS2 도구의 일부입니다.[4]

그 명령은 GnuWin32 프로젝트의 일부로 Microsoft Windows에 대해 별도 패키지로 사용할 수 있고[5] 공통적인 GNU 유닉스-계열 유틸리티의 네이티브 Win32 포트UnxUtils 모음입니다.[6]

uniq 명령은 역시 IBM i 운영 시스템에 이식되었습니다.[7]

See also

References

External links