Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 21 Aug 2008 23:16:55 +0930
From:      Wayne Sierke <ws@au.dyndns.ws>
To:        Wojciech Puchar <wojtek@wojtek.tensor.gdynia.pl>
Cc:        Steve Bertrand <steve@ibctech.ca>, freebsd-questions@freebsd.org
Subject:   Re: sed/awk, instead of Perl
Message-ID:  <1219326415.49053.89.camel@predator-ii.buffyverse>
In-Reply-To: <20080821151239.J7822@wojtek.tensor.gdynia.pl>
References:  <48AD63B7.8090107@ibctech.ca> <48AD6502.1040407@ibctech.ca> <20080821151239.J7822@wojtek.tensor.gdynia.pl>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, 2008-08-21 at 15:12 +0200, Wojciech Puchar wrote:
> >
> > cat tcpdump.txt | awk '{if ($3 != "192.168.100.204.25") print $3}' | \
> > awk '{FS = "."} {print $1,".",$2,".",$3,"."$4}' | sed s/" "//g
> 
> 
> why you all abuse "cat" command. simply awk .... <tcpdump.txt

Why do you abuse redundant input redirection? Simply:

        awk ... tcpdump.txt





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