[102377] in RedHat Linux List
Re: parsing text files - take a look at "cut"
daemon@ATHENA.MIT.EDU (Rick Forrester)
Wed Dec 2 17:02:12 1998
To: redhat-list@redhat.com
cc: rickf@glacier.jpl.nasa.gov
In-reply-to: Your message of "Wed, 02 Dec 1998 15:50:25 CST."
<199812022150.PAA28404@ftms.ftms.com>
Date: Wed, 02 Dec 1998 13:58:51 -0800
From: Rick Forrester <rickf@glacier.jpl.nasa.gov>
Resent-From: redhat-list@redhat.com
Reply-To: redhat-list@redhat.com
brown@ftms.COM said:
> >Just thought you guys might like to know the solution I came >up
> with. I just piped the output to > > nawk '{print $1}' > >and that
> command filtered out the 1st column. Replace $1 with $2 to get >the
> 2nd column and so on. >-Ed
> Won't work. Each and every space acts as a column separator, which
> means that the first "human" column, which contains the person's
> name, can have more than one name there. So that means that $2 could
> be the person's first or last name (depending if the file is first
> last or last, first). If there is a third part of the person's name,
> the address column may not start until $4, instead of $3.
> MB
--
Rick Forrister <Richard.Forrister@jpl.nasa.gov>
You'll wonder why your data's lost
When you load your system with MicroSoft...
--
PLEASE read the Red Hat FAQ, Tips, Errata and the MAILING LIST ARCHIVES!
http://www.redhat.com http://archive.redhat.com
To unsubscribe: mail redhat-list-request@redhat.com with
"unsubscribe" as the Subject.