Bash 검색 및 이전 명령 실행

Bash 검색 및 이전 명령 실행

에 따르면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 ...]

관련 정보