From owner-freebsd-net Tue Jun 27 18:10:33 2000 Delivered-To: freebsd-net@freebsd.org Received: from orthanc.ab.ca (207-167-15-66.dsl.worldgate.ca [207.167.15.66]) by hub.freebsd.org (Postfix) with ESMTP id BD8A737C487 for ; Tue, 27 Jun 2000 18:10:27 -0700 (PDT) (envelope-from lyndon@orthanc.ab.ca) Received: from orthanc.ab.ca (localhost [127.0.0.1]) by orthanc.ab.ca (8.11.0.Beta3/8.11.0.Beta3) with ESMTP id e5S1AB657245; Tue, 27 Jun 2000 19:10:11 -0600 (MDT) Message-Id: <200006280110.e5S1AB657245@orthanc.ab.ca> To: Brian Reichert Cc: freebsd-net@FreeBSD.ORG Subject: Re: suggested hack for ntpdate flags In-reply-to: Your message of "Tue, 27 Jun 2000 15:19:56 EDT." <20000627151956.D1800@numachi.com> Date: Tue, 27 Jun 2000 19:10:10 -0600 From: Lyndon Nerenberg Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org >>>>> "Brian" == Brian Reichert 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