steven chen
steven chen

Reputation: 57

Splitting lines by delimiter in large file

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

Answers (1)

ILostMySpoon
ILostMySpoon

Reputation: 2409

You can use cut to extract the second field (tab is the default delimiter for cut):

cut -f2 file

Upvotes: 1

Related Questions