番号(1. *)で始まる行に基づいて、テキストファイルを複数のテキストファイルに分割したいたとえば、このテキストファイルを2つのファイルに分割したい:
1. J Med Chem. 2013 May 23;56(10):4028-43. doi: 10.1021/jm400241j. Epub 2013 May 13.
Optimization of benzoxazole-based inhibitors of Cryptosporidium parvum inosine
5'-monophosphate dehydrogenase.
Gorla SK, Kavitha M, Zhang M, Chin JE, Liu X, Striepen B, Makowska-Grzyska M, Kim
Y, Joachimiak A, Hedstrom L, Cuny GD.
Department of Biology, Brandeis University , 415 South Street, Waltham,
Massachusetts 02454, USA.
Cryptosporidium parvum is an enteric protozoan parasite that has emerged as a
major cause of diarrhea, malnutrition, and gastroenteritis and poses a potential
bioterrorism threat.
PMID: 23668331 [PubMed - indexed for MEDLINE]
2.Biochem Pharmacol. 2013 May 1;85(9):1370-8. doi: 10.1016/j.bcp.2013.02.014. Epub
2013 Feb 16.
Carbonyl reduction of triadimefon by human and rodent 11β-hydroxysteroid
dehydrogenase 1.
Meyer A, Vuorinen A, Zielinska AE, Da Cunha T, Strajhar P, Lavery GG, Schuster D,
Odermatt A.
Swiss Center for Applied Human Toxicology and Division of Molecular and Systems
Toxicology, Department of Pharmaceutical Sciences, University of Basel,
Klingelbergstrasse 50, 4056 Basel, Switzerland.
11β-Hydroxysteroid dehydrogenase 1 (11β-HSD1) catalyzes the conversion of
inactive 11-oxo glucocorticoids (endogenous cortisone, 11-dehydrocorticosterone
and synthetic prednisone) to their potent 11β-hydroxyl forms (cortisol,
corticosterone and prednisolone).
Copyright © 2013 Elsevier Inc. All rights reserved.
PMID: 23419873 [PubMed - indexed for MEDLINE]
私はこれを試しました:
awk 'NF{print > $2;close($2);}' file
この:
split -l 2
しかし、空行を与える方法について混乱しています。(私はawkが初めてです。)