[coreboot] bash math
Peter Stuge
peter at stuge.se
Tue Sep 30 05:19:10 CEST 2008
Jordan Crouse wrote:
> > It works unless the vga bios file is zero bytes long :)
>
> Fixed - turns out that expr has a trick up its sleeve:
> Exit status is 0 if EXPRESSION is neither null nor 0, 1 if
> EXPRESSION is null or 0, 2 if EXPRESSION is syntactically
> invalid, and 3 if an error occurred
I like result=$[$[${something}]+$[${other}]] to not have to care.
$[] evaluates to 0
$[notanumber] also evaluates to 0
//Peter
More information about the coreboot
mailing list