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 07-22-2008
nipun_garg nipun_garg is offline
Registered User
  
 

Join Date: Jul 2008
Posts: 2
Question remove duplicates within a block in a file..help required

hi.. i have a file in the following format :-
name-a
age -12
address-123
age-12
phone-22222
============
name-ab
age -11
address-123
age-11
phone-222223
=============
name-abc
age -12
address-1234
age-12
phone-2222223
=============

now the problem is....I want to remove the duplicate age in each record...
how can I do that considering the age can be same for different records too...

Thanks in advance