分割文本文件分割成多个文件 [英] Split text file into multiple files

查看:157
本文介绍了分割文本文件分割成多个文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有有1000摘要空行中的每个抽象之间大的文本文件。我想这个文件分割成1000的文本文件。
我的文件看起来像

  16503654势必dodecylphosphocholine胶束神经肽k的三维结构。神经肽K(NPK),神经激肽A的N-末端延伸形式(NKA),再presents最有力和最持久的vasode pressor和迄今报道cardiomodulatory速激肽。其抑制剂谷氨酰胺合成酶的相互作用16504520计算机辅助分析。抑制谷氨酰胺合成酶(EC 6.3.1.2; GS)的机制膦及其类似物在使用分子建模方法的一些细节进行了研究。


解决方案

您可以使用拆分和设置每个输出文件的行数为2。每个文件都将有一个文本行和一个空行。

 分割-l 2档

I am having large text file having 1000 abstracts with empty line in between each abstract . I want to split this file into 1000 text files. My file looks like

16503654    Three-dimensional structure of neuropeptide k bound to dodecylphosphocholine micelles.      Neuropeptide K (NPK), an N-terminally extended form of neurokinin A (NKA), represents the most potent and longest lasting vasodepressor and cardiomodulatory tachykinin reported thus far.  

16504520    Computer-aided analysis of the interactions of glutamine synthetase with its inhibitors.        Mechanism of inhibition of glutamine synthetase (EC 6.3.1.2; GS) by phosphinothricin and its analogues was studied in some detail using molecular modeling methods. 

解决方案

You can use split and set "NUMBER lines per output file" to 2. Each file would have one text line and one empty line.

split -l 2 file

这篇关于分割文本文件分割成多个文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆