I have a csv file with 4 attributes in each line, delimited by comma. I’m trying to come up with a sed command to keep only the second attribute from each line. Any ideas on how to do it?
I have a csv file with 4 attributes in each line, delimited by comma.
Share
You’d be better off with
cut:If you want to remove dupes, and you don’t mind the order of the entries, simply do:
And to extend to attrs 1 and to, simply use: