On Thursday 27 March 2008 23:03, Kevin Holland wrote: > Hi all, > > I wrote a script to download files to a flash device and > calculate/verify checksums. I found that depending on the value of the > cksum this part of my code will fail and give an error of sh: 2173165883 > out of range. > > if [ $CKSUM2 -eq $CKSUM ]; then > echo "Done" > exit 0 > else > echo "Check Sum Failed" > exit 1 > fi
Works for me: # cat zz zz CKSUM=2173165883 CKSUM2=2173165883 if [ $CKSUM2 -eq $CKSUM ]; then echo "Done" exit 0 else echo "Check Sum Failed" exit 1 fi # ./busybox ash zz Done What exactly is "bad" value for CKSUM and CKSUM2 which trigger this? What version of busybox do you use? What is your "sh"? (in other words: what "grep SH_IS .config" says? Mine says: # CONFIG_FEATURE_SH_IS_ASH is not set # CONFIG_FEATURE_SH_IS_HUSH is not set # CONFIG_FEATURE_SH_IS_MSH is not set CONFIG_FEATURE_SH_IS_NONE=y ) -- vda _______________________________________________ busybox mailing list [email protected] http://busybox.net/cgi-bin/mailman/listinfo/busybox
