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

2013-06-16 Thread Linda Walsh
Mike Frysinger 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. -mike Indeed: set -u unset foo printf -v foo "" echo $foo bash: foo: unbo

Re: corrupted input after size function (input that's not recorded by bash)

2013-06-16 Thread Linda Walsh
Dave Gibson wrote: Trial and error suggests it's something to do with new-style command substitution. Try backticks: local s=`stty size` Yes... you are right. This works... while local s=$(stty size) does not. That's icky! I thought they were identical, they appea

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

2013-06-16 Thread Chris Down
On 17 June 2013 13:27, Mike Frysinger 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 exi

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

2013-06-16 Thread Mike Frysinger
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. -mike signature.asc Description: This is a digitally signed message part.