|
From: | lxnf98mm |
Subject: | Re: [Help-bash] something about bc |
Date: | Wed, 28 Dec 2011 09:56:00 -0600 (CST) |
User-agent: | Alpine 2.00 (LRH 1167 2008-08-23) |
On Wed, 28 Dec 2011, lina wrote:
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 $abash: let: 1.5: syntax error: invalid arithmetic operator (error token is ".5")1.5
echo "a=1.5; a+=1; print a;" | bc
[Prev in Thread] | Current Thread | [Next in Thread] |