![Bash 검색 및 이전 명령 실행](https://linux55.com/image/110463/Bash%20%EA%B2%80%EC%83%89%20%EB%B0%8F%20%EC%9D%B4%EC%A0%84%20%EB%AA%85%EB%A0%B9%20%EC%8B%A4%ED%96%89.png)
~에 따르면O'Reily의 Bash Pocket Reference(40페이지)다음 명령은 다음을 포함하는 최신 명령을 실행합니다 string
.
!?string[?]
위 명령을 실행하고 있지만 항상 돌아옵니다.
bash: !?string[?: event not found
어떻게 해야 하나요?
답변1
Bash 매뉴얼에서:
!?string[?]
Refer to the most recent command preceding the current position
in the history list containing string. The trailing ? may be
omitted if string is followed immediately by a newline.
이는 [?]
후행이 ?
선택 사항임을 의미합니다. 온라인 설명서의 대부분의 개요 섹션에서는 이 규칙을 사용합니다.
NAME
ls – list directory contents
SYNOPSIS
ls [-1AaCcdFfgHhikLlmnopqRrSsTtux] [file ...]