On Tuesday 11 December 2007 11:32:17 Carlos E. R. wrote: > The Monday 2007-12-10 at 21:22 -0800, Randall R Schulz wrote: > > As Carl mentioned, BASH acts like the C and C++ compilers in that a > > leading 0 signifies octal (base 8) numeric literals and a 0x prefix > > signifies hexadecimal (base 16). > > 'Ox' I knew, but '0' for octal I forgot. Perhaps I always though it was > 'Ou', not 'zero'. I never tried, as I never had use for octal. > > > You say you're doing temporal math. You might want to look at > > whether "date" makes this easier for you. It can do some temporal math. > > I know, and I tried. But didn't find a way to do it. > > If you are curious, what I'm doing is compare the CMOS clock with the > system clock, to prove it doesn't stray: > > > set `/sbin/hwclock --show` > HWC=$4 > > set `/bin/date +%T` > LOC=$1
HWC=$(/bin/date -d "$(/sbin/hwclock --show)" +%s) LOC=$(/bin/date +%s) DIFF=$((LOC-HWC)) if test $DIFF -gt 1; then ....and so on Anders -- Madness takes its toll -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
