bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Manual entry for !!:$


From: Martin Schulte
Subject: Manual entry for !!:$
Date: Sat, 18 Jan 2025 07:29:08 +0100

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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]