bash "let" barfs on addition
evuraan at gmail.com
Thu Mar 12 18:57:12 UTC 2009
Seen this sort of behaviour before? :
mybash:> let c=(a+b)
mybash:> echo $c
The correct answer should have been: 12200160415121876738
mybash:> echo "$a+$b" |bc -l
mybash:> bash --version
GNU bash, version 3.2.25(1)-release (i486-pc-linux-gnu)
Copyright (C) 2005 Free Software Foundation, Inc.
I know, I can use bc,dc,awk, python and even a desk calculator wide
enough :) - but, I am curious as to why is "let" letting us down?
Does a known bug exist already?
Any input would be much appreciated, many thanks in advance.!
More information about the ubuntu-users