Skip to main content
Tweeted twitter.com/#!/StackUnix/status/597570995948560387
added 15 characters in body; edited tags; edited title
Source Link
cuonglm
  • 158.1k
  • 41
  • 341
  • 419

split file into 2two parts, at a pattern

How to split a large file into 2two parts, at a pattern?

Given an example file.txtfile.txt:

ABC
EFG
XYZ
HIJ
KNL

I want to split this file at "XYZ"XYZ such that file1file1 contains lines up-to "XYZ"XYZ and rest of the lines in file2file2.

split file into 2 at a pattern

How to split a large file into 2, at a pattern?

Given an example file.txt

ABC
EFG
XYZ
HIJ
KNL

I want to split this file at "XYZ" such that file1 contains lines up-to "XYZ" and rest of the lines in file2.

split file into two parts, at a pattern

How to split a large file into two parts, at a pattern?

Given an example file.txt:

ABC
EFG
XYZ
HIJ
KNL

I want to split this file at XYZ such that file1 contains lines up-to XYZ and rest of the lines in file2.

Source Link
d.putto
  • 313
  • 1
  • 2
  • 7

split file into 2 at a pattern

How to split a large file into 2, at a pattern?

Given an example file.txt

ABC
EFG
XYZ
HIJ
KNL

I want to split this file at "XYZ" such that file1 contains lines up-to "XYZ" and rest of the lines in file2.