Linux命令:fold

控制文件内容输出时所占用的屏幕宽度

2024-12-31 17:39:06

命令行command

补充说明

fold命令 用于控制文件内容输出时所占用的屏幕宽度。fold命令会从指定的文件里读取内容,将超过限定列宽的列加入增列字符后,输出到标准输出设备。若不指定任何文件名称,或是所给予的文件名为“-”,则fold指令会从标准输入设备读取数据。

语法

fold(选项)(参数)

选项

-b或——bytes:以Byte为单位计算列宽,而非采用行数编号为单位;
-s或——spaces:以空格字符作为换列点;
-w<每列行数>或--width<每列行数>:设置每列的最大行数。

参数

文件:指定要显示内容的文件。

示例

fold -w 5 filename

评论

静谧以待,您的评论将是点睛之笔

撰写首个评论,启程你的前端奇妙之旅

is a Wiki for programming enthusiasts and professionals, organizing knowledge on programming.

Connect With Me

I have a fair amount of knowledge of Javascript, Typescript, VueJs, and Nuxt. If you have an interesting idea, either open source or paid let's connect.

Sent Mail
© 2024-2025 © . All rights reserved.