
De acuerdo aReferencia de bolsillo de Bash de O'Reily (página 40)lo siguiente ejecutará el comando más reciente que contiene string
:
!?string[?]
Estoy ejecutando dicho comando pero siempre obtengo:
bash: !?string[?: event not found
¿Cómo puedo hacer esto?
Respuesta1
Del manual de 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.
Esto [?]
significa que el seguimiento ?
es opcional. Encontrará esta convención utilizada en la mayoría de las secciones de sinopsis de los manuales en línea, por ejemplo
NAME
ls – list directory contents
SYNOPSIS
ls [-1AaCcdFfgHhikLlmnopqRrSsTtux] [file ...]