{"id":2440,"date":"2021-10-28T06:30:09","date_gmt":"2021-10-28T06:30:09","guid":{"rendered":"https:\/\/lgildv5i97.onrocket.site\/answers\/?post_type=question&#038;p=2440"},"modified":"2021-10-28T06:30:50","modified_gmt":"2021-10-28T06:30:50","slug":"batch-file-to-replace-multiple-rows-of-text","status":"publish","type":"question","link":"https:\/\/computing.net\/answers\/programming\/batch-file-to-replace-multiple-rows-of-text\/23844.html","title":{"rendered":"Batch File To Replace Multiple Rows Of Text"},"content":{"rendered":"<p>Hello,<\/p>\n<p>Can anyone help please?<\/p>\n<p>I would like to create a batch file which replaces not just one word or line in a file, but multiple lines, replacing the removed lines with some specified text. For example, let&#8217;s just say the lines that appear immediately below has the following entry:<\/p>\n<p>&#8220;Hello this is a very complex scenario but I (Line 1)<br \/>\nbelieve with MS DOS, there is always a way (Line 2)<br \/>\nround the problem. (Line 3)<br \/>\n(Line 4)<br \/>\nAny help on this would be greatly appreciated. (Line 5)<br \/>\nHappy New Year to all forum members.&#8221; (Line 6)<\/p>\n<p>I now need to replace Line 2, 3 and 4 with my some other text. It is worth pointing out my real-life scenario has a far greater number of lines to be replaced. Can this be down through a batch file?<\/p>\n","protected":false},"author":5,"featured_media":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"inline_featured_image":false,"iawp_total_views":6},"question-category":[55],"question_tags":[],"class_list":["post-2440","question","type-question","status-publish","hentry","question-category-programming"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/computing.net\/answers\/wp-json\/wp\/v2\/question\/2440","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/computing.net\/answers\/wp-json\/wp\/v2\/question"}],"about":[{"href":"https:\/\/computing.net\/answers\/wp-json\/wp\/v2\/types\/question"}],"author":[{"embeddable":true,"href":"https:\/\/computing.net\/answers\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/computing.net\/answers\/wp-json\/wp\/v2\/comments?post=2440"}],"wp:attachment":[{"href":"https:\/\/computing.net\/answers\/wp-json\/wp\/v2\/media?parent=2440"}],"wp:term":[{"taxonomy":"question-category","embeddable":true,"href":"https:\/\/computing.net\/answers\/wp-json\/wp\/v2\/question-category?post=2440"},{"taxonomy":"question_tags","embeddable":true,"href":"https:\/\/computing.net\/answers\/wp-json\/wp\/v2\/question_tags?post=2440"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}