title: How to get string from file in bash?
body: <p>I have file that is <strong>not</strong> JSON 
  and I want to get string of 'name' from the file but only name with key type with value 'typeX'
  Input :</p>
  
  <pre><code>ID : id
  mySer:
     - name : xyz
       type : typeX
  
  myServ2:
     - name : wyz
      params:
       - name :ppp
  </code></pre>
  
  <p>Output</p>
  
  <pre><code>name : xyz
  or xyz
  </code></pre>
  
  <p>I tried</p>
  
  <pre><code>awk '/"name":/{flag=1;next}/^$/{flag=0}flag'
  </code></pre>
  
  <p>but I got all the names</p>