bug-bash
[Top][All Lists]
Advanced

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

${var:+foo "$empty"}


From: Stephane Chazelas
Subject: ${var:+foo "$empty"}
Date: Sun, 23 Jan 2005 14:46:09 +0000
User-agent: Mutt/1.5.6i

Hi,

$ bash -c 'printf "<%s>\n" ${$:+a "$a"}'
<a>
$ ksh -c 'printf "<%s>\n" ${$:+a "$a"}'
<a>
<>
$ dash -c 'printf "<%s>\n" ${$:+a "$a"}'
<a>
<>
$ bash --version
GNU bash, version 3.00.16(1)-release (i386-pc-linux-gnu)
Copyright (C) 2004 Free Software Foundation, Inc.

Same, when replacing ":+" with -, +, :-.

It's OK when I replace "$a" with "$@", though:

$ bash -c 'printf "<%s>\n" ${$+a "$@"}' - ''
<a>
<>

regards,
St├ęphane





reply via email to

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