Reputation: 61
i have a file.csv with space separator;
name1 A
name1 B
name1 C
name2 A
name2 B
name2 C
my desidered output is:
name1 A
B
C
name2 A
B
C
i have used the sort -u e unique -u command, but not work. Maybe it's not the right commands?
Upvotes: 1
Views: 66
Reputation: 11216
Using awk
awk '{if(x!=$1)x=$1;else gsub(/./," ",$1)}1' file
name1 A
B
C
name2 A
B
C
Upvotes: 6