博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
linux 文本文件行读_如何在Linux上的文本文件中换行?
阅读量:2516 次
发布时间:2019-05-11

本文共 732 字,大约阅读时间需要 2 分钟。

linux 文本文件行读

I have some text which contain some long lines. Now I would like to break lines to at most 80 characters. How to wrap long lines in a text file on ?

我有一些文本 ,其中包含一些长行。 现在,我想将行最多中断80个字符。 如何在上的文本文件中换行?

The can wrap lines.

可以换行。

fold – wrap each input line to fit in specified width

折叠–包裹每条输入线以适合指定的宽度

For your purpose,

为了您的目的

fold -w 80 -c in.txt > out.txt

fold has more options, you may check

折叠有更多选择,您可以检查

-b, –bytes

count bytes rather than columns

-b,-bytes

计算字节数而不是列数

-c, –characters

count characters rather than columns

-c,–字符

计算字符而不是列

-s, –spaces

break at spaces

-s,–空格

打破空间

-w, –width=WIDTH

use WIDTH columns instead of 80

-w,–width = WIDTH

使用WIDTH列而不是80

Answered by Eric Z Ma.
埃里克·马(Eric Z Ma)回答。

翻译自:

linux 文本文件行读

转载地址:http://lulwd.baihongyu.com/

你可能感兴趣的文章
python3 序列分片记录
查看>>
Atitit.git的存储结构and 追踪
查看>>
atitit 读书与获取知识资料的attilax的总结.docx
查看>>
B站 React教程笔记day2(3)React-Redux
查看>>
找了一个api管理工具
查看>>
使用Postmark测试后端存储性能
查看>>
NSTextView 文字链接的定制化
查看>>
第五天站立会议内容
查看>>
ATMEGA16 IOport相关汇总
查看>>
JAVA基础-多线程
查看>>
面试题5:字符串替换空格
查看>>
[Codevs] 线段树练习5
查看>>
Amazon
查看>>
component-based scene model
查看>>
Echart输出图形
查看>>
hMailServer搭建简单邮件系统
查看>>
从零开始学习jQuery
查看>>
Spring+SpringMVC+MyBatis深入学习及搭建(四)——MyBatis输入映射与输出映射
查看>>
opacity半透明兼容ie8。。。。ie8半透明
查看>>
CDOJ_24 八球胜负
查看>>