From owner-freebsd-questions Thu Jan 17 11:22:15 2002 Delivered-To: freebsd-questions@freebsd.org Received: from out4.mx.nwbl.wi.voyager.net (out4.mx.nwbl.wi.voyager.net [169.207.1.77]) by hub.freebsd.org (Postfix) with ESMTP id B532837B402 for ; Thu, 17 Jan 2002 11:22:13 -0800 (PST) Received: from shell.core.com (IDENT:2525@shell.voyager.net [169.207.1.89]) by out4.mx.nwbl.wi.voyager.net (8.11.1/8.11.4/1.7) with ESMTP id g0HJM9519727; Thu, 17 Jan 2002 13:22:09 -0600 (CST) Received: (from dpoland@localhost) by shell.core.com (8.11.6/8.11.6/1.3) id g0HJM8h23200; Thu, 17 Jan 2002 13:22:08 -0600 (CST) Date: Thu, 17 Jan 2002 13:22:08 -0600 From: Doug Poland To: Mike Dresser Cc: adrian kok , freebsd-questions@FreeBSD.ORG Subject: Re: awk or sed Message-ID: <20020117132208.C8746@polands.org> References: <20020117190510.80351.qmail@web21206.mail.yahoo.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: ; from mdresser_b@windsormachine.com on Thu, Jan 17, 2002 at 02:12:02PM -0500 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Thu, Jan 17, 2002 at 02:12:02PM -0500, Mike Dresser wrote: > On Fri, 18 Jan 2002, [iso-8859-1] adrian kok wrote: > > > Hello > > > > I have 5 columns in the text file. But I only want to > > have the third column data > > > > How do I take it? > > does > > cat filename | awk '{print $3}' > > do what you want? replacing cat with whatever you want, of course. > perhaps awk '{print $3}' filename is more straightforward -- Regards, Doug To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message