title: sed on mac: 'extra characters after p command'
body: <p>On Linux I use this to get the next two lines after the <code>[test]</code> line:</p>
  
  <pre><code>sed -n '/\[test\]/{n;p;n;p}' my-file
  </code></pre>
  
  <p>On Mac I get:</p>
  
  <pre><code>sed: 1: "/\\[test\\]/{n;p;n;p}": extra characters at the end of p command.
  </code></pre>
  
  <p>Is there an expression that works on both platforms or on Mac a completely different command must be used?</p>