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: Greg Wooledge
Subject: Re: Behavior of ${var/*/text} has changed
Date: Fri, 16 Sep 2016 15:45:39 -0400
User-agent: Mutt/1.4.2.3i

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:~$ 



reply via email to

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