Reputation: 1
I have a text file containing multiple chunks of texts. In between each chunk, I've inserted the string '######## START OF NEW ARTICLE ########'. I'm trying to split the file at each of those instances using csplit in order to get separate files, each containing a unique chunk of text.
This is what I'm running through the terminal:
csplit -f check -n 3 desktop/TEST/test.txt ‘######## START OF NEW ARTICLE ########’ {*}
I get the error: csplit: ‘########: unrecognised pattern
What am I doing wrong?
Upvotes: 0
Views: 484
Reputation: 46
You need to enclose the regex pattern in // e.g. ‘/######## START OF NEW ARTICLE ########/’.
Upvotes: 0