[I have already found the answer, see below]
Hi all,
I am looking for a simple oneliner (preferably) to print only selected columns (given by their column numbers) from a tab separated text file. Could you please suggest a command?
Thanks!
Answer
awk -v OFS='\t' '{ print $1, $2, $4 }' old_file> new_file
Hi all,
I am looking for a simple oneliner (preferably) to print only selected columns (given by their column numbers) from a tab separated text file. Could you please suggest a command?
Thanks!
Answer
awk -v OFS='\t' '{ print $1, $2, $4 }' old_file> new_file
Comment