
De acordo comReferência do Bash Pocket de O'Reily (página 40)o seguinte executará o comando mais recente que contém string
:
!?string[?]
Estou executando o referido comando, mas sempre volto:
bash: !?string[?: event not found
Como posso fazer isso?
Responder1
Do manual do 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.
Isso [?]
significa que o final ?
é opcional. Você encontrará esta convenção usada na maioria das seções de sinopse dos manuais on-line, por exemplo
NAME
ls – list directory contents
SYNOPSIS
ls [-1AaCcdFfgHhikLlmnopqRrSsTtux] [file ...]