Skip site navigation (1)Skip section navigation (2)
Date:      20 Nov 2001 12:50:01 +0000
From:      Wayne Pascoe <freebsd@molemanarmy.com>
To:        freebsd-questions@freebsd.org
Subject:   Sort
Message-ID:  <86r8qt7gjq.fsf@pan.ehsrealtime.com>

next in thread | raw e-mail | index | archive | help
Hi all,

I have a cvs file as follows :

id,first_name,last_name,company_name

I want to sort this on first name. Doing
cat file.csv | sort 
sorts starting at the beginning of the line. 

Is there a way for sort to sort a file based on a field delimited by a
character, or should I just use a perl script ? 

Thanks,

-- 
- Wayne Pascoe
                                 | Everything to excess. To enjoy the 
freebsd@molemanarmy.com          | flavor of life, take big bites. Moderation 
http://www.molemanarmy.com       | is for monks. - Robert Heinlein
                                 | 

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?86r8qt7gjq.fsf>