小编Dyl*_*ney的帖子

如何根据行模式的开头将文本文件拆分为多个文件?

我有一些文本文件,我想根据我放在各行开头的任意“标签”将它们分成不同的文件。

示例文本文件:

I CELEBRATE myself, and sing myself,  
And what I assume you shall assume, 
For every atom belonging to me as good belongs to you.

#here I loafe and invite my soul, 
#here I lean and loafe at my ease observing a spear of summer grass.

#there My tongue, every atom of my blood, form'd from this soil, this air,
#there Born here of parents born here from parents the same, and their parents the same, 
#here I, now …
Run Code Online (Sandbox Code Playgroud)

shell awk text-processing macos

2
推荐指数
1
解决办法
392
查看次数

标签 统计

awk ×1

macos ×1

shell ×1

text-processing ×1