Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 22 Sep 2006 10:00:57 -0700
From:      Gary Kline <kline@sage.thought.org>
To:        "Patrick M. Hausen" <hausen@punkt.de>
Cc:        stable@freebsd.org, SigmaX asdf <fydernix@gmail.com>
Subject:   Re: sed and comma-delimited file
Message-ID:  <20060922170057.GA70779@thought.org>
In-Reply-To: <20060922065915.GA77932@hugo10.ka.punkt.de>
References:  <c04d7e300609190926t1e5dce14wea7ef1a16ccf9af1@mail.gmail.com> <54894.192.168.0.10.1158706436.squirrel@webmail.sd73.bc.ca> <002101c6dc46$470b1d50$0000fea9@gsicomp.on.ca> <20060922065915.GA77932@hugo10.ka.punkt.de>

next in thread | previous in thread | raw e-mail | index | archive | help
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@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-stable
> To unsubscribe, send any mail to "freebsd-stable-unsubscribe@freebsd.org"

-- 
   Gary Kline     kline@thought.org   www.thought.org     Public service Unix




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