Magnus
Magnus

Reputation: 728

Trouble passing static string as REGEXP with csplit

I'm on a Linux terminal and struggling to split a large text file into several smaller files. I'm trying with csplit, but csplit demands that the delimiter pattern is passed as a REGEXP. The static delimiter pattern is , lorum ipsum. How do I write that as a REGEXP? After reading a bit, I would expect /'^, lorum ipsum$'/ to work, but it does not. Could anyone help me with the correct syntax?

Upvotes: 0

Views: 48

Answers (1)

streetturtle
streetturtle

Reputation: 5850

You should use /', lorum ipsum'/, ^ and $ is start and end of the line accordingly, which is not needed in your case.

Upvotes: 1

Related Questions