拆分基于内容的.txt文件 [英] Split a .txt file based on content
本文介绍了拆分基于内容的.txt文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个巨大的 * TXT
文件如下:
I have a huge *.txt
file as follows:
~~~~~~~~ small file content 1 <br>
~~~~~~~~ small file content 2 <br>
...
~~~~~~~~ small file content n <br>
如何通过pferably 庆典
?
How do I split this into n files, preferably via bash
?
推荐答案
使用则csplit
$ csplit --help
Usage: csplit [OPTION]... FILE PATTERN...
Output pieces of FILE separated by PATTERN(s) to files `xx00', `xx01', ...,
and output byte counts of each piece to standard output.
这篇关于拆分基于内容的.txt文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文