Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 27 Jun 2000 19:10:10 -0600
From:      Lyndon Nerenberg <lyndon@orthanc.ab.ca>
To:        Brian Reichert <reichert@numachi.com>
Cc:        freebsd-net@FreeBSD.ORG
Subject:   Re: suggested hack for ntpdate flags 
Message-ID:  <200006280110.e5S1AB657245@orthanc.ab.ca>
In-Reply-To: Your message of "Tue, 27 Jun 2000 15:19:56 EDT." <20000627151956.D1800@numachi.com> 

next in thread | previous in thread | raw e-mail | index | archive | help
>>>>> "Brian" == Brian Reichert <reichert@numachi.com> writes:

    Brian> ntpdate_flags="`sed -n 's/^server \(.*\)/\1/p' <
    Brian> /etc/ntp.conf`"

I have always used:

  awk '/^server/ {print $2}' /etc/ntp.conf

The awk version doesn't suffer from lines in ntp.conf like:

  server ntp.foo.bar prefer

and I find it a bit more readable than the equivelent sed.

--lyndon


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-net" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200006280110.e5S1AB657245>