Is it possible to use Event Designators for history such as
!!
!n
!-n
!string
in bash scripts?
For example:
I have a variable, which keeps my input from command line in it. Also I have a tmp history. Every command which is executed inside my script is stored in this history and command
history
work perfectly.
If I type
!!
error occures: "!!: command not found".