How to truncate STDIN line length?

前端 未结 9 1807
醉酒成梦
醉酒成梦 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:32

    This isn't exactly what you're asking for, but GNU Screen (included with OS X, if I recall correctly, and common on other *nix systems) lets you turn line wrapping on/off (C-a r and C-a C-r). That way, you can simply resize your terminal instead of piping stuff through a script.

    Screen basically gives you "virtual" terminals within one toplevel terminal application.

提交回复
热议问题