On 17 June 2013 13:27, Mike Frysinger <vap...@gentoo.org> 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"
bar
$ echo "$BASH_VERSION"
4.2.45(2)-release

Reply via email to