Path: utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!thunder.mcrcim.mcgill.edu!snorkelwacker.mit.edu!usc!elroy.jpl.nasa.gov!sdd.hp.com!hplabs!pyramid!infmx!dberg From: dberg@informix.com (David I. Berg) Newsgroups: comp.unix.questions Subject: Re: getting a field from a line in awk/sed/? Message-ID: <1991Jan9.225344.19979@informix.com> Date: 9 Jan 91 22:53:44 GMT References: <1991Jan9.162817.17038@porthos.cc.bellcore.com> Sender: news@informix.com (Usenet News) Organization: Informix Software, Inc. Lines: 12 In article <1991Jan9.162817.17038@porthos.cc.bellcore.com> snk@bae.bae.bellcore.com (Samuel N Kamens) writes: > >The question I had was, how can I use UNIX tools to >get one field out of a line? Use cut. The syntax is ` cut -fn -d" " ', where n is the number of the field you wish to extract. -d" " specifies spaces as the delimiter between fields. `man cut' will give you all the particulars. ___ ___ dberg@cougar.informix.com / ) __ . __/ /_ ) _ __ Informix Software Inc. (303) 850-0210 _/__/ (_(_ (/ / (_(_ _/__> (-' -/~ (_- 5299 DTC Blvd #740; Englewood CO 80111 {uunet|pyramid}!infmx!dberg The opinions expressed herein are mine alone.