Re: Arithmetic expressions and parameters with newlines breaks

2007-07-02 Thread Bob Proulx
Jan Schampera wrote: > Well, I guess intuitively expected that it evaluates to 0, like for > example: > > $ test=string > $ echo $((test)) > 0 In that case it is like the 'atoi(3)' routine. A non-numeric has no number value and is evaluated to be zero. A single zero is a valid arithmetic expres

Re: Arithmetic expressions and parameters with newlines breaks

2007-07-02 Thread Andreas Schwab
Jan Schampera <[EMAIL PROTECTED]> writes: > Description: > Parameters inside arithmetic contexts like $(()) and (()) break > the expression parsing when they contain a newline > > Repeat-By: > $ foo="12 > > 34" > > $ echo $((foo)) > bash: 12 >

Re: Arithmetic expressions and parameters with newlines breaks

2007-07-02 Thread Bob Proulx
Jan Schampera wrote: > Parameters inside arithmetic contexts like $(()) and (()) break > the expression parsing when they contain a newline Thank you for your bug report. > $ foo="12 > > 34" > > $ echo $((foo)) > bash: 12 > 34: syntax error