Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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?

share|improve this question
add comment

2 Answers 2

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
share|improve this answer
add comment

Using

less -S

does the trick. See also the answers here

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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