linux - remove duplicated values of a specific parameter in bash in a file -
i have file
cat file ab,12 ab,45 ab,23 bh,32 bl,12 ab,10 bh,13
and file has duplicated lines first parameter
i need output unique values of specific parameter separated comma
for example output
cat file ab,12 bh,32 bl,12
the following command works example:
sort -u -s -t, -k1,1
Comments
Post a Comment