The UNIX and Linux Forums  


Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
.
google unix.com




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #1 (permalink)  
Old 05-13-2008
Vinaykumar1 Vinaykumar1 is offline
Registered User
  
 

Join Date: May 2008
Posts: 16
Sorting data and place them in different folders

Hello Unix gurus,
I am new to Unix. I am working on some dummy project which involves unix scripting.

I have a query :

There is a file Number.dat which is of form say

AAA|123|4563|animal
AAA|1234|45634|animal2
BBB|123444|456312|bird
BBB|123445|456313|bird2

Here AAA,BBB are headers.
Now I want to sort Number.dat based on header and place them in different header.dat file.
How do I do that? I would be really greatful if some one helps me.


Thanks in advance
Vinay