Date: 29 Jun 2000 01:13:22 +0200 From: Cyrille Lefevre <clefevre@no-spam.citeweb.net> To: Brian Reichert <reichert@numachi.com> Cc: Lyndon Nerenberg <lyndon@orthanc.ab.ca>, freebsd-net@FreeBSD.ORG Subject: Re: suggested hack for ntpdate flags Message-ID: <em5hxuul.fsf@pc166.gits.fr> In-Reply-To: Brian Reichert's message of "Tue, 27 Jun 2000 21:45:10 -0400" References: <20000627151956.D1800@numachi.com> <200006280110.e5S1AB657245@orthanc.ab.ca> <20000627214510.A6905@numachi.com>
next in thread | previous in thread | raw e-mail | index | archive | help
Brian Reichert <reichert@numachi.com> writes: > On Tue, Jun 27, 2000 at 07:10:10PM -0600, Lyndon Nerenberg wrote: > > >>>>> "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. > > Yup, more rigorous. I'll give it a shake... don't forget the -b (mandatory) and -s (optional) flags also. Cyrille. -- home:mailto:clefevre@no-spam.citeweb.net Supprimer "no-spam." pour me repondre. work:mailto:Cyrille.Lefevre@no-spam.edf.fr Remove "no-spam." to answer me back. 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?em5hxuul.fsf>