bug-bash
[Top][All Lists]
Advanced

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

Re: Fwd: Strange results


From: Kerin Millar
Subject: Re: Fwd: Strange results
Date: Fri, 27 Oct 2023 15:41:05 +0100

On Fri, 27 Oct 2023 15:34:16 +0100
Kerin Millar <kfm@plushkava.net> wrote:

<snip>

> Keep in mind that the Shell Command Language specification requires that 
> "Default Value" parameter expansion be implemented in the way that it is, and 
> that there are countless scripts that depend on the status quo. However, the 
> Shell Command Language also doesn't suffer from this ambiguity because it 
> doesn't specify any means of performing "Substring Expansion" to begin with 
> (it's a bash extension). Since there is no way for bash to otherwise know 
> that "-10:1" wasn't intended as the word in ${parameter:-word}, you'll have 
> to choose a preferred workaround for negative offsets and live with it, as 
> irksome as it may be.

Of course, I meant to write "10:1" there, not "-10:1".

-- 
Kerin Millar



reply via email to

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