Tue, 10/25/2011 – 10:44
#1
To sort an output file having duplicates using sort.
Hi all, I have one input file with repeated data except two fields that together make the rows unique.eg:Â
AAAAAA BBBBBB CCCCC D 01236555 FFFFFFF
AAAAAA BBBBBB CCCCC E 21548799 FFFFFFF
AAAAAA BBBBBB CCCCC X FFFFFFF
MMMMMM NNNNNN OOOOO I 98765444 GGGGGGG
MMMMMM NNNNNN OOOOO J 47125896 GGGGGGG
MMMMMM NNNNNN OOOOO H 11225544 GGGGGGG
SSSSSS PPPPPP RRRRR T 74555555 UUUUUUU
SSSSSS PPPPPP RRRRR V 85475222 UUUUUUU
Now, I have to make the final output file to look like the below.Â
“; ; ; ;
AAAAAA BBBBBB CCCCC 01236555 21548799Â Â Â Â Â Â Â Â Â Â FFFFFFF
MMMMMM NNNNNN OOOOO 98765444 47125896 11225544 GGGGGGG
SSSSSS PPPPPP RRRRR 74555555 85475222Â Â Â Â Â Â UUUUUUU
Can this be achieved through sort. If yes please guide me on how it can be coded. Hoping for a quick response.
Thank You, Kimir
Click the +1 button  below to share it with your friends and colleagues
Share this if you liked it!
Disclaimer