title: Find first occurrence of a string after the first occurrence of another string with bash
body: <p>I have an input file that looks like this and i want the first occurrence of words but only after the first occurrence of special</p>
  <h1>The numbers are only there so i know i got the right string</h1>
  <p>EDIT: I realized that it matters the strings have /'s</p>
  <pre><code>words/and/stuff #1
  words/more #2
  some/other/words #3
  special/this #1
  words/i/need/you/i.really.need.you #4
  special/cool #2 
  words/random #5
  </code></pre>
  <p>Im trying to find the first occurrence of &quot;word&quot; after i find the first occurrence of &quot;special&quot;</p>
  <p>The output should be</p>
  <pre><code>words/i/need/you/i.really.need.you #4
  </code></pre>
  <p>Ive tried the following</p>
  <pre><code>grep -m1 special file | grep -m1 words file 
  
  awk 'NR==1,/special/ &amp;&amp; NR==1,/words/ {print $0}' file 
  </code></pre>