Find duplicates lines based on some delimited fileds on line
Posted
by Oliv
on Stack Overflow
See other posts from Stack Overflow
or by Oliv
Published on 2010-05-26T10:54:30Z
Indexed on
2010/05/26
14:11 UTC
Read the original article
Hit count: 203
Hello,
I have a file with lines having some fields delimited by "|".
I have to extract the lines that are identical based on some of the fileds (i.e. find lines which contain the same values for fields 1,2,3 12,and 13) Other fields contents have no importance for searching but the whole extracted lines have to be complete.
Can anyone tell me how I can do that in KSH scripting (By exemple a script with some arguments (order dependent) that define the fileds separator and the fields which have to be compared to find duplicates lines in input file )
Thanks in advance and kind regards
Oli
© Stack Overflow or respective owner