bug-bash
[Top][All Lists]
Advanced

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

Re: Manual entry for !!:$


From: microsuxx
Subject: Re: Manual entry for !!:$
Date: Sat, 18 Jan 2025 17:51:06 +0100

!!:$ null
!$ null
$_ echo

On Sat, Jan 18, 2025, 7:29 AM Martin Schulte <gnu@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
>
>


reply via email to

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