From owner-freebsd-stable@FreeBSD.ORG Tue Sep 19 16:39:31 2006 Return-Path: X-Original-To: freebsd-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 7E33916A494 for ; Tue, 19 Sep 2006 16:39:31 +0000 (UTC) (envelope-from lists-freebsd-stable@biaix.org) Received: from grummit.biaix.org (86.Red-213-97-212.staticIP.rima-tde.net [213.97.212.86]) by mx1.FreeBSD.org (Postfix) with SMTP id 648E843D72 for ; Tue, 19 Sep 2006 16:39:27 +0000 (GMT) (envelope-from lists-freebsd-stable@biaix.org) Received: (qmail 50906 invoked by uid 1012); 19 Sep 2006 16:39:43 -0000 Date: Tue, 19 Sep 2006 18:39:43 +0200 From: Joan Picanyol i Puig To: freebsd-stable@freebsd.org Message-ID: <20060919163943.GA50813@grummit.biaix.org> Mail-Followup-To: freebsd-stable@freebsd.org References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.11 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: Tue, 19 Sep 2006 16:39:31 -0000 * SigmaX asdf [20060919 18:31]: > I have a series of comma-delimited text files with fourteen columns of > data and several hundred rows. I want to use a short shell script to > strip them of the last 9 columns, leaving the same file but with just > five of its columns. I can do it in C++, but that seems like > overkill. How would I go about doing it with sed or a similar > utility? cut -d ',' -f 1-5 qvb -- pica