From owner-freebsd-ipfw Tue Mar 27 0: 6:26 2001 Delivered-To: freebsd-ipfw@freebsd.org Received: from gndrsh.dnsmgr.net (GndRsh.dnsmgr.net [198.145.92.4]) by hub.freebsd.org (Postfix) with ESMTP id B095A37B718 for ; Tue, 27 Mar 2001 00:06:22 -0800 (PST) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: (from freebsd@localhost) by gndrsh.dnsmgr.net (8.9.3/8.9.3) id AAA90708; Tue, 27 Mar 2001 00:06:17 -0800 (PST) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <200103270806.AAA90708@gndrsh.dnsmgr.net> Subject: Re: Scripting with IPFW In-Reply-To: from Johnny Dang at "Mar 26, 2001 03:42:51 pm" To: johnny.dang@johnnydang.net (Johnny Dang) Date: Tue, 27 Mar 2001 00:06:16 -0800 (PST) Cc: FREEBSD-IPFW@FreeBSD.ORG (FreeBSD IpFW) X-Mailer: ELM [version 2.4ME+ PL54 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-ipfw@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > Thanks you all (especially UNIX, SCANNER, Mikel, and Scott)... That is why > this FreeBSD is great... This line will do it (I can now base on this and > change to fix my need)... > > ifconfig de0 | grep "inet" | head -1 | awk '{print $2}' > > Thanks to you all... But why the orginal commands from Linux won't work on > FreeBSD? > > ifconfig de0 | grep "inet" | cut -d -f2 | cut -d " " -f1 ? ^^ missing delim arg to -d option, The above command has a syntax error in it is why it won't work :-). Once corrected it works just fine on BSD: ifconfig de0 | grep "inet" | cut -d " " -f2 | cut -d " " -f1 198.145.92.4 > Just for curiosity? Btw, I download the new RedHAT Wolverines and Mandrake > 8.0 and those GUI look like Lindows now. But my boss likes it !!!!! > > ++++++++++++++++++++++++++++++++++++++++++++++++++ > "The instructions said to use Windows 98 or better, > so I installed FreeBSD...It is working now!..." > ++++++++++++++++++++++++++++++++++++++++++++++++++ > Johnny Dang > Senior Network Engineer/MCSE + Internet > > > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-ipfw" in the body of the message > -- Rod Grimes - KD7CAX @ CN85sl - (RWG25) rgrimes@gndrsh.dnsmgr.net To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ipfw" in the body of the message