Dave Hart wrote:
On Tue, Feb 21, 2012 at 08:12, Michael Tatarinov <[email protected]> wrote:

easier :)

#!/bin/sh

eval `ntpq -c 'rv 0 ss_uptime'`
let secs=$(($ss_uptime%60))
...


You get the gold star for using ntpq as it was designed to be used :)
So many people screen-scrape human-readable ntpq displays without
realizing it's all built on var=value underneath.

And completely unsave ( and opaque to boot ) .

( Not that i refrain from using similar constructs on all occasions.
  but I would prefer a "save eval" that works inside a limited namespace )

uwe

_______________________________________________
questions mailing list
[email protected]
http://lists.ntp.org/listinfo/questions

Reply via email to