Skip to content

Instantly share code, notes, and snippets.

@outsinre
Created February 28, 2016 07:33
Show Gist options
  • Save outsinre/826ce09529315f91c8ab to your computer and use it in GitHub Desktop.
Save outsinre/826ce09529315f91c8ab to your computer and use it in GitHub Desktop.
a-a 12 34 12
a-a-a 56 56
a-ba-ao-ke-luo 78 90 90

Each line is a key values pattern. The key is a string delimited by hyphens. while values delimited by spaces.

I want to remove duplicate vlaues on each line:

a-a 12 34
a-a-a 56
a-ba-ao-ke-luo 78 90

How to achieve this by bash?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment