IT-Dienstleistungen

csplit

All posts

FreeBSD

Split text file at marker

cat split.txt 
one
two
SPLITHERE
three

csplit -f myprefix split.txt "/SPLITHERE/"
8
16

ls
myprefix00	myprefix01	split.txt

cat myprefix00
one
two

cat myprefix01
SPLITHERE
three