-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 The Tuesday 2007-12-11 at 19:21 +0100, Anders Johansson wrote:
HWC=$(/bin/date -d "$(/sbin/hwclock --show)" +%s) LOC=$(/bin/date +%s)
DIFF=$((LOC-HWC))
if test $DIFF -gt 1; then
Wow. :-O So easy... However... I think the end result is not correct, because the first line substract the "offset" from hwclock: nimrodel:~ # hwclock Tue Dec 11 20:36:12 2007 -0.470828 seconds ^^^^^ and I'm not sure that is correct. My idea is that when we do these two commands in sequence: hwclock --show ; date the time printed by both corresponds to (almost) the same instant, because the first command waits till the second boundary before exiting. I'm not certain, anyway, that's why I make the comparison >1 and not >0. Your code, by the way, discovers a bug in the syntax coloring of mcedit: it doesn't see both '"' quotes and does the wrong colours. - -- Cheers, Carlos E. R. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.4-svn0 (GNU/Linux) iD8DBQFHXukMtTMYHG2NR9URAoO9AJ9QIE+lS4Ghj0C13uFMe42kMUiQWQCgkqqM Ybovs372VTo1daMzjvZuGmI= =UwhM -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org