shell to split file

A simple UNIX/LINUX shell to split file (here is filename) based on specific indicator (here is “\n\n\n”) into pieces (here is “poem_”a):

awk ‘BEGIN{RS=”\n\n\n”}{a++}{print > “poem_”a”.html”}’ filename

be careful both shell file and the file to split need to convert EOL to linux format by notepad++

By the way: sometime Win10 takes high CPU%. A possible culprit is the “Inking and typing personalization” under settings–>privacy. Just switch it off.