title: Indent lines matching a word, then print them with a replacement
body: <p>I am trying to replace all occurrences of <code>open</code> with <code>not open</code>.  I want to print the original text with modified lines indented and preserved in original form followed by the modified form.</p>
  
  <p>This command was not enough:</p>
  
  <pre><code>sed 's/open/not open/' file.txt
  </code></pre>
  
  <p>Sample input:</p>
  
  <pre><code>this is the first line of text
  this text is very open
  and this is the next line of text 
  </code></pre>
  
  <p>Sample output:</p>
  
  <pre><code>this is the first line of text
      this text is very open
      this text is very not open 
  and this is the next line of text 
  </code></pre>