The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
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 02-10-2009
need_help need_help is offline
Registered User
  
 

Join Date: Jan 2008
Posts: 6
Sort complex data

Hi,

Can someone here help sorting the following data in numeric order?

INPUT:
FIRST abc(3) def(13) fgh(1) ijk(6) abc(2)
SECOND dfe(10) abc(4) hij(19) tlm(1) hij(1) hub(10) abc(1) fed(3)
OTHERS hij(10) mok(4) bub(19) hij(1) abc(2) abc(15) abc(1) hij(3)


OUTPUT:
FIRST def(13) ijk(6) abc(3) abc(2) fgh(1)
SECOND hij(19) dfe(10) hub(10) abc(4) fed(3) abc(1) hij(1) tlm(1)
OTHERS bub(19) abc(15) hij(10) mok(4) hij(3) abc(2) abc(1) hij(1)

Thanks in advance for your help!!!