sed and comma-delimited file
Gary Kline
kline at sage.thought.org
Fri Sep 22 10:01:03 PDT 2006
On Fri, Sep 22, 2006 at 08:59:15AM +0200, Patrick M. Hausen wrote:
> 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.
>
I think the entire group of *nix users would benefit from
having a list of these kind of links. bRief tutorials
(that I have long since lost, BTW) on awk and sed, along
with things-related.
much else.
I'm saving all URL's, thanks ;-)
gary
> SCNR,
> Patrick
> --
> punkt.de GmbH Internet - Dienstleistungen - Beratung
> Vorholzstr. 25 Tel. 0721 9109 -0 Fax: -100
> 76137 Karlsruhe http://punkt.de
> _______________________________________________
> freebsd-stable at freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-stable
> To unsubscribe, send any mail to "freebsd-stable-unsubscribe at freebsd.org"
--
Gary Kline kline at thought.org www.thought.org Public service Unix
More information about the freebsd-stable
mailing list