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

Popular posts from this blog

How to logout from a login page in asp.net -

Stack level too deep error after upgrade to rails 3.2 and ruby 1.9.3 -