How to truncate long matching lines returned by grep or ack

前端 未结 8 1722
攒了一身酷
攒了一身酷 2020-12-13 05:38

I want to run ack or grep on HTML files that often have very long lines. I don\'t want to see very long lines that wrap repeatedly. But I do want to see just that portion of

8条回答
  •  粉色の甜心
    2020-12-13 05:57

    Pipe your results thru cut. I'm also considering adding a --cut switch so you could say --cut=80 and only get 80 columns.

提交回复
热议问题