Skip to content
Advertisement

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?

Advertisement

Answer

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

User contributions licensed under: CC BY-SA
6 People found this is helpful
Advertisement