From owner-freebsd-stable@FreeBSD.ORG Fri Sep 22 17:01:03 2006 Return-Path: X-Original-To: stable@freebsd.org Delivered-To: freebsd-stable@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7873316A4A7 for ; Fri, 22 Sep 2006 17:01:03 +0000 (UTC) (envelope-from kline@sage.thought.org) Received: from sage.thought.org (dsl231-043-140.sea1.dsl.speakeasy.net [216.231.43.140]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7872843D6B for ; Fri, 22 Sep 2006 17:01:02 +0000 (GMT) (envelope-from kline@sage.thought.org) Received: from sage.thought.org (kline@localhost [127.0.0.1]) by sage.thought.org (8.13.6/8.12.10) with ESMTP id k8MH10pn070928; Fri, 22 Sep 2006 10:01:00 -0700 (PDT) (envelope-from kline@sage.thought.org) Received: (from kline@localhost) by sage.thought.org (8.13.6/8.13.1/Submit) id k8MH0wdI070927; Fri, 22 Sep 2006 10:00:58 -0700 (PDT) (envelope-from kline) Date: Fri, 22 Sep 2006 10:00:57 -0700 From: Gary Kline To: "Patrick M. Hausen" Message-ID: <20060922170057.GA70779@thought.org> References: <54894.192.168.0.10.1158706436.squirrel@webmail.sd73.bc.ca> <002101c6dc46$470b1d50$0000fea9@gsicomp.on.ca> <20060922065915.GA77932@hugo10.ka.punkt.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20060922065915.GA77932@hugo10.ka.punkt.de> X-Organization: Thought Unlimited. Public service Unix since 1986. X-Of_Interest: Observing twenty years of service to the Unix community User-Agent: Mutt/1.5.13 (2006-08-11) Cc: stable@freebsd.org, SigmaX asdf Subject: Re: sed and comma-delimited file X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Sep 2006 17:01:03 -0000 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