{"id":2803,"date":"2020-08-23T16:49:25","date_gmt":"2020-08-23T08:49:25","guid":{"rendered":"http:\/\/www.softbeam.net\/hobby\/?p=2803"},"modified":"2020-08-23T16:49:25","modified_gmt":"2020-08-23T08:49:25","slug":"shell-and-process","status":"publish","type":"post","link":"https:\/\/softbeam.net\/hobby\/?p=2803","title":{"rendered":"shell to split file"},"content":{"rendered":"\n<p>A simple UNIX\/LINUX shell to split file (here is filename) based on specific indicator (here is &#8220;\\n\\n\\n&#8221;) into pieces (here is &#8220;poem_&#8221;a):<\/p>\n\n\n\n<p>awk &#8216;BEGIN{RS=&#8221;\\n\\n\\n&#8221;}{a++}{print > &#8220;poem_&#8221;a&#8221;.html&#8221;}&#8217; filename<\/p>\n\n\n\n<p>be careful both shell file and the file to split need to convert EOL to linux format by notepad++<\/p>\n\n\n\n<p>By the way: sometime Win10 takes high CPU%. A possible culprit is the &#8220;Inking and typing personalization&#8221; under settings&#8211;>privacy. Just switch it off.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>A simple UNIX\/LINUX shell to split file (here is filename) based on specific indicator (here is &#8220;\\n\\n\\n&#8221;) into pieces (here is &#8220;poem_&#8221;a): awk &#8216;BEGIN{RS=&#8221;\\n\\n\\n&#8221;}{a++}{print > &#8220;poem_&#8221;a&#8221;.html&#8221;}&#8217; 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 &hellip; <a href=\"https:\/\/softbeam.net\/hobby\/?p=2803\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;shell to split file&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[],"class_list":["post-2803","post","type-post","status-publish","format-standard","hentry","category-physical"],"_links":{"self":[{"href":"https:\/\/softbeam.net\/hobby\/index.php?rest_route=\/wp\/v2\/posts\/2803","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/softbeam.net\/hobby\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/softbeam.net\/hobby\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/softbeam.net\/hobby\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/softbeam.net\/hobby\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2803"}],"version-history":[{"count":0,"href":"https:\/\/softbeam.net\/hobby\/index.php?rest_route=\/wp\/v2\/posts\/2803\/revisions"}],"wp:attachment":[{"href":"https:\/\/softbeam.net\/hobby\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2803"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/softbeam.net\/hobby\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2803"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/softbeam.net\/hobby\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2803"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}