Date: Fri, 22 Sep 2006 08:59:15 +0200 From: "Patrick M. Hausen" <hausen@punkt.de> To: Matt Emmerton <matt@gsicomp.on.ca> Cc: stable@freebsd.org, SigmaX asdf <fydernix@gmail.com> Subject: Re: sed and comma-delimited file Message-ID: <20060922065915.GA77932@hugo10.ka.punkt.de> In-Reply-To: <002101c6dc46$470b1d50$0000fea9@gsicomp.on.ca> References: <c04d7e300609190926t1e5dce14wea7ef1a16ccf9af1@mail.gmail.com> <54894.192.168.0.10.1158706436.squirrel@webmail.sd73.bc.ca> <002101c6dc46$470b1d50$0000fea9@gsicomp.on.ca>
next in thread | previous in thread | raw e-mail | index | archive | help
Hi, all! On Tue, Sep 19, 2006 at 07:49:42PM -0400, Matt Emmerton wrote: > > cat file | awk -F"," '{ printf "%s,%s,%s,%s,%s\n",$1,$2,$3,$4,$5 }' > > > newfile > > What's wrong with this? > > cat file | cut -f-5 -c';' > newfile Both commands suffer badly from useless use of cat(1) ;-)) See http://sial.org/howto/shell/useless-cat/ for one of the dozens of explanations on the web. SCNR, Patrick -- punkt.de GmbH Internet - Dienstleistungen - Beratung Vorholzstr. 25 Tel. 0721 9109 -0 Fax: -100 76137 Karlsruhe http://punkt.de
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20060922065915.GA77932>