Software-Rec

用於讀取表格數據的命令行實用程序

  • July 23, 2014

我正在尋找一個命令行實用程序,它可以讓我快速調查大型數據集的結構。現在我正在使用:head -n 2 dataset但問題是輸出的寬度大於我的終端/螢幕的寬度。

完美的是一個水平滾動文件的工具(按固定數量的列),就像我可以使用Ctrl+f/滾動瀏覽在 Vim 中打開的文件一樣Ctrl+b

我會推薦less

您可以向任何方向瀏覽

less -S logfile

-S或**–chop-long-lines**

          Causes lines longer than the screen width to be chopped rather than folded.  That is, the portion of a long line that does not fit in the screen width is not shown.  The default is to fold long lines; that is, display
          the remainder on the next line.

用於水平移動

ESC-)RIGHTARROW

          Scroll horizontally right N characters, default half the screen width (see the -# option).  If a number N is specified, it becomes the default for future RIGHTARROW and LEFTARROW commands.  While the text is scrolled,
          it acts as though the -S option (chop lines) were in effect.

ESC- **(**或向左箭頭

          Scroll horizontally left N characters, default half the screen width (see the -# option).  If a number N is specified, it becomes the default for future RIGHTARROW and LEFTARROW commands.

引用自:https://unix.stackexchange.com/questions/146057