LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 11-27-2007, 07:32 PM   #1
arya6000
Member
 
Registered: Sep 2005
Posts: 30

Rep: Reputation: 15
Sort command


Hello

I did some Googling and was not able to find it, so let me know if you know how to do it. Here is what I want to do:

Lets say I have a file with these contents:



Quote:
ada 66 Retired 60319 napanee
alfre 71 Retired 68315 Caledon
anila 26 Employed 70772 milton
brian 100 Retired 87937 London
darren 88 Retired 46499 orangeville
elilini 83 Retired 24286 toronto
george 45 Employed 64495 PICTON
and I want to sort the file by the forth (4th) column, how can I use the sort command to do that?
 
Old 11-27-2007, 08:37 PM   #2
norobro
Member
 
Registered: Feb 2006
Distribution: Debian Sid
Posts: 792

Rep: Reputation: 331Reputation: 331Reputation: 331Reputation: 331
Did you read the man page?

Code:
elilini 83 Retired 24286 toronto
darren 88 Retired 46499 orangeville
ada 66 Retired 60319 napanee
george 45 Employed 64495 PICTON
alfre 71 Retired 68315 Caledon
anila 26 Employed 70772 milton
brian 100 Retired 87937 London
 
Old 11-27-2007, 08:50 PM   #3
arya6000
Member
 
Registered: Sep 2005
Posts: 30

Original Poster
Rep: Reputation: 15
I figured it out
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Command line to sort files satimis Programming 6 06-28-2005 03:50 AM
Sort Command saravanan1979 Programming 1 10-03-2004 12:36 PM
Activating case sensitivity in `sort' command? wirawan0 Linux - General 4 06-26-2004 11:20 AM
The SORT command Rezon Programming 2 10-30-2003 05:14 PM
Using the Sort command in vi timnphx Programming 2 04-07-2001 12:39 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 05:59 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration