bug-bash
[Top][All Lists]
Advanced

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

Re: Wrong input confuses bash's arithmetic unit permanently


From: Enrico Scholz
Subject: Re: Wrong input confuses bash's arithmetic unit permanently
Date: Wed, 12 Sep 2007 14:38:15 +0200
User-agent: Gnus/5.1007 (Gnus v5.10.7) XEmacs/21.5-b28 (linux)

"Chris F.A. Johnson" <cfajohnson@gmail.com> writes:

>> $ let tmp="foo.a"+0
>> $ let ++i
>> $ echo $i
>> 0
>    I agree that it is a bug, but it is one that will never bother me
>    because I always use the POSIX arithmetic syntax:

happens there too:

$ : $(( tmp=foo.a+0 ))
bash: tmp=foo.a+0 : syntax error: invalid arithmetic...
$ i=0 ; : $(( ++i )) ; echo $i
0


Enrico




reply via email to

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