用于读取表格数据的命令行实用程序

用于读取表格数据的命令行实用程序

我正在寻找一个命令行实用程序,它可以让我快速研究大型数据集的结构。现在我正在使用:head -n 2 dataset但问题是输出的宽度大于我的终端/屏幕的宽度。

完美的是一个水平滚动文件(按固定列数)的工具,就像我可以使用Ctrl+f/滚动在 Vim 中打开的文件一样Ctrl+b

答案1

我会推荐less

您可以在任何方向浏览

less -S logfile

-S或者--砍长线

          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键-)或者右箭头

          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.

相关内容