I need to view a large tab delimited file using less. There is a column with ~200 characters which I am not interested in seeing but that column pushes all other columns to right making the viewing hard. Is there a way to prevent less from showing more than the tab width in a column?

link|improve this question

33% accept rate
feedback

1 Answer

up vote 1 down vote accepted

You can use 'cut' to delete that column and redirect the output to less.

For eg if its the first column that you don't want to see

cut -f 1 --complement $FILENAME | less

If you have a delimiter other than tab, you can specify that using '-d;

cut -d ',' -f 1 --complement $FILENAME | less
link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.