No bash shell, !45
retorna esse comando do histórico de comandos (ou !32
ou !873
).
An event designator is a reference to a command line entry in the history list. Unless the reference is absolute, events are relative to the current position in the history list.
!
Start a history substitution, except when followed by a space, tab, the end of the line, ‘=’ or ‘(’ (when the extglob shell option is enabled using the shopt builtin).
!n
Refer to command line n.
Consulte aqui para detalhes completos no manual bash.