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-25-2005
Teh Tiack Ein Teh Tiack Ein is offline
Registered User
  
 

Join Date: Jul 2005
Posts: 7
Remove Duplicate Lines in File

I am doing KSH script to remove duplicate lines in a file. Let say the file has format below.

FileA
------
1253-6856
3101-4011
1827-1356
1822-1157
1822-1157
1000-1410
1000-1410
1822-1231
1822-1231
3101-4011
1822-1157
1822-1231
........

and I want to simply it with no duplicate line as file below.

FileA
------
1253-6856
3101-4011
1827-1356
1822-1157
1000-1410
1822-1231
........

How can I do that in KSH?