!!:$ null !$ null $_ echo On Sat, Jan 18, 2025, 7:29 AM Martin Schulte <g...@schrader-schulte.de> wrote:
> Hello, > > in 9.3.2 of https://www.gnu.org/software/bash/manual/bash.html we find: > > !!:$ designates the last argument of the preceding command. This may be > shortened to !$. > > Shouldn't this be "the last word" instead of the "the last argument": > > $ echo hello > /dev/null > $ echo !!:$ > echo /dev/null > /dev/null > > 5.2 states (correctly from my point of view): > > _ ... Subsequently, expands to the last argument to the previous simple > command executed in the foreground, after expansion. ... > > $ echo hello > /dev/null > $ echo $_ > hello > > Best regards, > > Martin > >