linux - How to cut first n and last n columns? -


how can cut off first n , last n columns tab delimited file?

i tried cut first n column. have no idea combine first , last n column

cut -f 1-10 -d "<ctr>v <tab>" filename 

cut can take several ranges in -f:

columns 4 , 7 onwards:

cut -f -4,7-

or fields 1,2,5,6 , 10 onwards:

cut -f 1,2,5,6,10-

etc


Comments

Popular posts from this blog

Delphi Wmi Query on a Remote Machine -