From owner-freebsd-questions Mon Feb 5 13:45:29 2001 Delivered-To: freebsd-questions@freebsd.org Received: from relay4.inwind.it (relay4.inwind.it [212.141.53.75]) by hub.freebsd.org (Postfix) with ESMTP id 3C8F537B401 for ; Mon, 5 Feb 2001 13:45:11 -0800 (PST) Received: from bartequi.ottodomain.org (62.98.171.111) by relay4.inwind.it (5.1.056) id 3A6DB81B003FAEA2; Mon, 5 Feb 2001 22:44:02 +0100 From: Salvo Bartolotta Date: Mon, 05 Feb 2001 21:47:03 GMT Message-ID: <20010205.21470300@bartequi.ottodomain.org> Subject: Re: Help me make FreeBSD shine To: Cliff Sarginson Cc: Joe.Warner@smed.com, lucas@slb.to, freebsd-questions@FreeBSD.ORG In-Reply-To: <20010205214713.A1054@raggedclown.net> References: <852569EA.005F58D2.00@Deimos.smed.com> <20010205214713.A1054@raggedclown.net> X-Mailer: SuperCalifragilis X-Priority: 3 (Normal) MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG >>>>>>>>>>>>>>>>>> Original Message <<<<<<<<<<<<<<<<<< On 2/5/01, 9:47:14 PM, Cliff Sarginson wrote=20 regarding Re: Help me make FreeBSD shine: > On Mon, Feb 05, 2001 at 10:25:14AM -0700, Joe.Warner@smed.com wrote: > > > > > > Hey thanks! > > > > Right now, I'm just starting with something simple. > > > > I created this script: > > > > #!/bin/sh > > > > grep -v "#" /etc/hosts | awk '{print $1}'=20 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ You could simply say ``awk '$1 !~ "#" {print $1}' /etc/hosts'',=20 couldn't you? Am I missing something ? Incidentally, what action would ``grep -v [...]'' perform on such a=20 line as the following ? =20 ...blah blah... # brief comment on blah blah Is this what you expect from ``grep -v "#" ''?=20 Best regards, Salvo To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message