How can I get 2nd and third column in tab delim file in bash?

RnD picture RnD · Jun 11, 2011 · Viewed 49k times · Source

I want to use bash to process a tab delimited file. I only need the second column and third to a new file.

Answer

Carl Norum picture Carl Norum · Jun 11, 2011

cut(1) was made expressly for this purpose:

cut -f 2-3 input.txt > output.txt