bug-bash
[Top][All Lists]
Advanced

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

Re: Typo in Bash Reference Manual


From: Greg Wooledge
Subject: Re: Typo in Bash Reference Manual
Date: Sun, 29 Jun 2025 11:42:30 -0400
User-agent: Mutt/1.10.1 (2018-07-13)

On Sun, Jun 29, 2025 at 06:39:18 -0600, Stan Marsh wrote:
> Note, incidentally, that it is not strictly true that a negative offset has
> to be preceded by a space.  A zero will work as well.  And I think that is
> clearer.  I.e., instead of:
> 
> # Print the last 2 characters of $HOME
> $ echo ${HOME: -2}
> 
> You can do:
> 
> $ echo ${HOME:0-2}

Or ${HOME:(-2)} if you like.



reply via email to

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