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 03-15-2008
jkl_jkl jkl_jkl is offline
Registered User
  
 

Join Date: Aug 2007
Posts: 46
largest field , awk , help

Hi All,

My file is like this:

Code:
$ cat max.txt
abcd:1982:a
efghij:1980:e
klmn:1923:k
opqrst:1982:o
I have to find out the largest first field and the corresponding line. i.e

Output required:

Code:
efghij efghij:1980:e
opqrst opqrst:1982:o
HTH,
jkl_jkl