I have been teaching myself the meaning of various bash 'reserved words'.
In doing this, I inadvertently typed the command
echo !()
To my surprise, this command executes, and produces output identical to the command
echo *
In other words, the output was a list of the contents of the current directory
file1 file2 directory1 directory2
Why is bash essentially expanding !()
to *
?
I can't determine the meaning of ()
, as it seems to be an invalid expression in other contexts.