awk를 사용하면 수동 입력이 필요하지 않습니다.

awk를 사용하면 수동 입력이 필요하지 않습니다.

달리기는 어떻게 이루어 man awk졌나요 No manual entry for awk? 솔직히 말해서 저는 개인적으로 Awk를 Archlinux 시스템에 설치해 본 적이 없습니다. 그런데 Awk가 현재 시스템(마지막으로 설치한 시스템)에 없다는 것을 알게 되었는데 이상합니다 man awk. man gawk반면에 잘 작동합니다.

어떤 단서가 있나요?

버전과 관련될 수 있는 기타 출력은 다음과 같습니다.

$ awk --version 
GNU Awk 5.1.0, API: 3.0 (GNU MPFR 4.1.0, GNU MP 6.2.0)
Copyright (C) 1989, 1991-2020 Free Software Foundation.

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program. If not, see http://www.gnu.org/licenses/.

$ which awk
/usr/bin/awk

$ ls -l $(which awk)
lrwxrwxrwx 1 root root 4 Apr 15 07:38 /usr/bin/awk -> gawk

$ which gawk
/usr/bin/gawk

답변1

에서 man man매뉴얼 페이지는 일반적으로 /usr/share/man.

gawkAwk( , , , ...) 의 구현이 여러 개 있으므로 mawk일반적으로 사용하려는 실제 Awk(귀하의 경우 GNU awk)에 대한 심볼릭 링크입니다. 맨페이지도 마찬가지입니다.

$ readlink /usr/share/man/man1/awk.1.gz
/etc/alternatives/awk.1.gz
$ readlink /etc/alternatives/awk.1.gz
/usr/share/man/man1/gawk.1.gz

아래에서 Awk 링크를 찾을 수 있는지 확인하세요 /usr/share/man.

find /usr/share/man/man1 -path '*/awk*'
  • 그렇다면 링크가 깨졌을 가능성이 있습니다. 이 경우 해당 링크를 제거하고 필요한 매뉴얼 페이지에 대한 링크를 생성할 수 있습니다(아래 참조).

  • 그렇지 않으면 링크가 손실됩니다. 어떻게든 삭제했거나 배송되지 않았습니다. 이 문제는 패키지를 다시 설치하면 해결될 수 있습니다. 그렇지 않으면 수동으로 심볼릭 링크를 만듭니다.

ln -s /usr/share/man/man1/gawk.1.gz /usr/share/man/man1/awk.1.gz

답변2

매뉴얼 페이지는 패키지에 awk있습니다 :man-pages

% pacman -Qo /usr/share/man/man1/awk.1p.gz
/usr/share/man/man1/awk.1p.gz is owned by man-pages 5.07-2

이 패키지를 명시적으로 설치해야 합니다.

% pacman -Qi man-pages
Name            : man-pages
Version         : 5.07-2
Description     : Linux man pages
Architecture    : any
URL             : https://www.kernel.org/doc/man-pages/
Licenses        : GPL  custom
Groups          : None
Provides        : None
Depends On      : None
Optional Deps   : None
Required By     : None
Optional For    : None
Conflicts With  : None
Replaces        : None
Installed Size  : 5.61 MiB
Packager        : Bartłomiej Piotrowski <[email protected]>
Build Date      : So 09 Aug 2020 17:54:00
Install Date    : Sa 22 Aug 2020 01:56:46
Install Reason  : Explicitly installed
Install Script  : No
Validated By    : Signature

관련 정보