The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > OS Specific Forums > AIX
Google UNIX.COM


AIX AIX is IBM's industry-leading UNIX operating system that meets the demands of applications that businesses rely upon in today's marketplace.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Comparing two files superstar003 Forum Support Area for Unregistered Users & Account Problems 1 05-08-2008 12:34 AM
comparing shadow files with real files terrym UNIX for Advanced & Expert Users 4 02-08-2007 11:38 PM
Ignoring Some Text When Comparing 2 Files jimmyflip UNIX for Dummies Questions & Answers 1 09-21-2004 06:22 AM
comparing text files sjumma UNIX for Dummies Questions & Answers 2 11-12-2003 06:44 PM
grep multiple text files in folder into 1 text file? coppertone UNIX for Dummies Questions & Answers 7 08-23-2002 11:50 AM

Reply
 
Submit Tools LinkBack Thread Tools Search this Thread Display Modes
  #1  
Old 02-24-2006
Registered User
 

Join Date: Feb 2006
Posts: 9
comparing within text files

hi!

some looping problem here...

i have a 2-column text file

4835021 20060903FAL0132006
4835021 20060904FAL0132006
4835021 20060905FAL0132006
4835023 20060903FAL0132006
4835023 20061001HAL0132006
4835023 20061002HAL0132006
4835088 20061002HAL0132006
4835099 20061002HAL0132006

what i would like to do is to arrange this to (below)

4835021 with earliest date
4835023 with earliest date
4835033 with earliest date
4835088 with earliest date
4835099 with earliest date

i would like to know which proper commands should i use.


thanks!
Reply With Quote
Forum Sponsor
  #2  
Old 02-24-2006
DogDay's Avatar
Registered User
 

Join Date: Jun 2005
Location: /dev/null
Posts: 83
check out the sort command.

maybe :

Code:
sort +1
Reply With Quote
  #3  
Old 02-27-2006
Registered User
 

Join Date: Jun 2005
Posts: 23
I don't know if it would help, but "-n" would also say to sort numerically.
Reply With Quote
  #4  
Old 02-28-2006
Registered User
 

Join Date: Feb 2006
Posts: 9
hi! thanks for the help... you gave me an idea with that sort command. I actually used "sort -r -1" and it worked.

thanks again!
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes




All times are GMT -7. The time now is 05:41 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008. All Rights Reserved.Ad Management by RedTyger Visit The Complex Event Processing Blog

Content Relevant URLs by vBSEO 3.2.0