[Top][All Lists]

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

Re: `printf -v foo ""` does not set foo=

From: Chris Down
Subject: Re: `printf -v foo ""` does not set foo=
Date: Mon, 17 Jun 2013 13:41:51 +0800

On 17 June 2013 13:27, Mike Frysinger <address@hidden> wrote:
> simple test code:
>         unset foo
>         printf -v foo ""
>         echo ${foo+set}
> that does not display "set".  seems to have been this way since the feature
> was added in bash-3.1.

Interesting. It also won't change it if it already exists, it seems:

$ foo=bar
$ printf -v foo ""
$ echo "$foo"
$ echo "$BASH_VERSION"

reply via email to

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