title: How to use grep match string then look for other string
body: <p>Is it possible to look for 'string1' if its true then look for 'string2' using grep.
  Here is my situation. i have many txt report files in that i need to search for 'FAIL' based on test path 'Test path: path/to/test'
  sample report file:</p>
  
  <pre><code>     Test path:          path/to_tests/t1 
       Host name:                   testpc1
                    AMEND_1/Sec3/E30012.c,          ;               PASS;     ;              ;             ;          ;
                    AMEND_1/Sec3/E30013.c,          ;               FAIL;     ;              ;             ;          ;
                    AMEND_1/Sec3/E30014.c,          ;               PASS;     ;              ;             ;          ;
                    AMEND_1/Sec3/E30015.c,          ;               FAIL;     ;              ;             ;          ;
  </code></pre>
  
  <p>I'm trying following command, but it prints only FAIL lines but not test path, also i want to remove ';' in the lines.</p>
  
  <pre><code> find . -name "*concat.txt" | xargs grep -E 'Test path: path/to_tests/t1' grep -e 'FAIL'
  </code></pre>
  
  <p>Please guide me how can i achieve this using one line command.</p>
  
  <p>desire output:</p>
  
  <pre><code> Test path:          path/to_tests/t1   AMEND_1/Sec3/E30013.c  FAIL
   Test path:          path/to_tests/t1   AMEND_1/Sec3/E30015.c  FAIL
  </code></pre>