fold 命令简解

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了fold 命令简解相关的知识,希望对你有一定的参考价值。

fold   指令会从指定的文件里读取内容,将超过限定列宽的列加入增列字符后,输出到标准输出设备。

           若不指定任何文件名称,或是所给予的文件名为"-",则fold指令会从标准输入设备读取数据。

语法

fold [-bs][-w<每列行数>][--help][--version][文件...]

参数

  • -b或--bytes 以Byte为单位计算列宽,而非采用行数编号为单位。

  • -s或--spaces 以空格字符作为换列点。

  • -w<每列行数>或--width<每列行数> 设置每列的最大行数。

  • --help 在线帮助。

  • --version 显示版本信息。

技术分享

技术分享


======================手册=========================

用法概要
fold [OPTION]... [FILE]...
描述
User Commands                                             FOLD(1)
NAME
     fold - wrap each input line to fit in specified width
SYNOPSIS
     fold [OPTION]... [FILE]...
DESCRIPTION
     Wrap  input  lines in each FILE (standard input by default),
     writing to standard output.
     Mandatory arguments to long options are mandatory for  short
     options too.
     -b, --bytes
          count bytes rather than columns
     -s, --spaces
          break at spaces
     -w, --width=WIDTH
          use WIDTH columns instead of 80
     --help
          display this help and exit
     --version
          output version information and exit
AUTHOR
     Written by David MacKenzie.
REPORTING BUGS
     Report fold bugs to [email protected]
     GNU  coreutils home page: <http://www.gnu.org/software/core-
     utils/>
     General help using GNU  software:  <http://www.gnu.org/geth-
     elp/>
     Report  fold  translation  bugs  to  <http://translationpro-

GNU coreutils 8.16   Last change: March 2012                    2

技术分享

技术分享



技术分享

技术分享


以上是关于fold 命令简解的主要内容,如果未能解决你的问题,请参考以下文章

Linux文本处理命令“sed”简解

Linux文本处理命令“awk”简解

ping命令总结

shutdown命令总结

shutdown命令总结

Linux中常用的50个命令