On Friday 17 July 2009 16:37:38 Alexander Graf wrote:
On 17.07.2009, at 15:23, Christoph Egger wrote:
Hi!
Attached patch makes signrom.sh working on NetBSD.
The output of the 'od' command leads to a syntax error
which breaks the build.
So why replace the $(( ... )) calculation with expr then?
because $i contains some whitespaces and leading zeros.
This lets the bourne shell think, $i is a string and doing math with
strings
results in syntax error.
Passing it down into expr trims them.
A few lines below there's another $(( )) that apparently works.
$sum is not a string there.