How to truncate STDIN line length?

前端 未结 9 1808
醉酒成梦
醉酒成梦 2021-01-05 07:15

I\'ve been parsing through some log files and I\'ve found that some of the lines are too long to display on one line so Terminal.app kindly wraps them onto the next line. Ho

9条回答
  •  轻奢々
    轻奢々 (楼主)
    2021-01-05 07:48

    Another tactic I use for viewing log files with very long lines is to pipe the file to "less -S". The -S option for less will print lines without wrapping, and you can view the hidden part of long lines by pressing the right-arrow key.

提交回复
热议问题