How to remove duplicate (or more) values within a selected field in a file, keeping only one copy?
Exemple
Input file:
A 1,2,3,45,1,8,2,3
B 5,6,6,6,6,6,2,3,7
Expected output:
A 1,2,3,45,8
B 5,6,2,3,7
How to remove duplicate (or more) values within a selected field in a file, keeping only one copy? Exemple Input file:
Expected output:
|
|||
|
Another
|
|||
|
A
(it processes all the fields that contain |
|||||
|
With
(it processes all the fields that contain |
||||
|
I guess this is like Stephane's though it is a little different. Anyway, I took the trouble to write it. I based it on this thing I did before here (where I also explain it a lot better)...
OUTPUT
|
|||
|
For completeness, a solution in
|
|||
|
|
|||
|