sed/awk, instead of Perl

Wayne Sierke ws at au.dyndns.ws
Thu Aug 21 13:47:01 UTC 2008


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




More information about the freebsd-questions mailing list