<?xml version="1.0" encoding="utf-8"?><!DOCTYPE article  PUBLIC '-//OASIS//DTD DocBook XML V4.4//EN'  'http://www.docbook.org/xml/4.4/docbookx.dtd'><article><articleinfo><title>SedSubstituteMultipleLines</title><revhistory><revision><revnumber>1</revnumber><date>2011-09-29 21:26:38</date><authorinitials>ClauzClauz</authorinitials></revision></revhistory></articleinfo><section><title>Substitute multiple lines using sed</title><screen><![CDATA[echo -e "1\n2\n3"]]></screen><para>substitute lines one and two with the word &quot;hello&quot; </para><screen><![CDATA[echo -e "1\n2\n3" | sed -e '/1/,/2/c hello']]></screen></section></article>