From owner-freebsd-questions Tue Nov 20 4:52: 9 2001 Delivered-To: freebsd-questions@freebsd.org Received: from clientmail.realtime.co.uk (simian.realtime.co.uk [213.52.146.137]) by hub.freebsd.org (Postfix) with ESMTP id 750C337B417 for ; Tue, 20 Nov 2001 04:51:58 -0800 (PST) Received: from pan.ehsrealtime.com ([213.52.146.196]) by clientmail.realtime.co.uk with esmtp (Exim 3.20 #1) id 166ANU-00007S-01 for freebsd-questions@freebsd.org; Tue, 20 Nov 2001 12:51:52 +0000 Received: from waynep by pan.ehsrealtime.com with local (Exim 3.33 #1) id 166ALh-0007b4-00 for freebsd-questions@freebsd.org; Tue, 20 Nov 2001 12:50:01 +0000 From: Wayne Pascoe To: freebsd-questions@freebsd.org Subject: Sort Date: 20 Nov 2001 12:50:01 +0000 Message-ID: <86r8qt7gjq.fsf@pan.ehsrealtime.com> Lines: 21 User-Agent: Gnus/5.0808 (Gnus v5.8.8) XEmacs/21.1 (Cuyahoga Valley) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii 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 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