The UNIX and Linux Forums  


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 04-09-2008
gopikgunda gopikgunda is offline
Registered User
  
 

Join Date: Apr 2008
Posts: 1
Remove duplicates from File from specific location

How can i remove the duplicate lines from a file, for example

sample123456Sample
testing123456testing
XXXXX131323XXXXX
YYYYY423432YYYYY
fsdfdsf123456gsdfdsd

all the duplicates from column 6-12 , must be deleted. I want to consider the first row, if same comes in the given range i want to delete the line.
The output am expecting is
sample123456Sample
XXXXX131323XXXXX
YYYYY423432YYYYY

Thanks