Reputation: 57
I have a file in this format:
a(tab)b(tab)c
some lines do not have a c
column
What I need to do is take the b
column out of every line? What would be the best way to accomplish this?
Upvotes: 1
Views: 62
Reputation: 2409
You can use cut
to extract the second field (tab is the default delimiter for cut
):
cut -f2 file
Upvotes: 1