Sample Header Ad - 728x90

How to split a file into multiple file after N appearence of a pattern?

4 votes
2 answers
764 views
I have a file on Linux, containing the coordinates of thousands of molecules. Each molecule starts with a line containing always the same pattern: @MOLECULE And then continues with other lines. I would like to split the file into multiple files, each containing a certain number of molecules. What is the easiest way to do this?
Asked by ginopino (380 rep)
May 21, 2021, 09:04 AM
Last activity: May 22, 2021, 02:16 PM