help-bash
[Top][All Lists]
Advanced

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

[Help-bash] something about bc


From: lina
Subject: [Help-bash] something about bc
Date: Wed, 28 Dec 2011 23:44:04 +0800
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.24) Gecko/20111114 Icedove/3.1.16

Hi,

I tried but still don't know how to achieve it with *bc*

some wrong try:

$ a=1.5 ; a+=1 ; echo $a
1.51

$ a=1.5 ; a+=1 | bc; echo $a
1.5

$ a=1.5 ; let "a+=1" | bc; echo $a
bash: let: 1.5: syntax error: invalid arithmetic operator (error token is ".5")
1.5

Thanks with best regards,



reply via email to

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