bug-bash
[Top][All Lists]
Advanced

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

Re: Behavior of ${var/*/text} has changed


From: Eric Pruitt
Subject: Re: Behavior of ${var/*/text} has changed
Date: Fri, 16 Sep 2016 12:47:24 -0700
User-agent: Mutt/1.5.23 (2014-03-12)

On Fri, Sep 16, 2016 at 03:45:39PM -0400, Greg Wooledge wrote:
> On Fri, Sep 16, 2016 at 12:38:20PM -0700, Eric Pruitt wrote:
> > first time. However, that construct still won't work because if a
> > variable is defined, it will still choose "not empty:"
> >
> >     ericpruitt@sinister:~$ X=
> >     ericpruitt@sinister:~$ echo ${X+Not empty}
> >     Not empty
>
> Then you want :+ instead of +
>
> Note that I had :+ (not +) in my original email.
>
> imadev:~$ X=
> imadev:~$ echo "${X+Not empty}"
> Not empty
> imadev:~$ echo "${X:+Not empty}"
>
> imadev:~$

Right you are; thanks.

Eric



reply via email to

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