sed and comma-delimited file
Patrick M. Hausen
hausen at punkt.de
Thu Sep 21 23:59:23 PDT 2006
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
More information about the freebsd-stable
mailing list