title: grep -v with perl one liner
body: <p>Input is the multiple yaml files inside git:</p>
  
  <p>e.g. config/conf/hosts/ghf04.lmn/engine-1.yaml</p>
  
  <pre><code>ports:
    ajp: 8010
    http: 8011
    shutdown: 8012
  apps:
    - null
    - Michael
    - Hardy
  </code></pre>
  
  <p>I have something like this to extract the data under apps:</p>
  
  <pre><code>for j in a b
  do
   for i in 01 02 03 04 05 06 07 08 09 10
   do
       echo $j$i
                   ssh $j$i 'grep -P ".+(- .+)" abc/engine*yaml | perl -pe "s|\abc\/(ghf\d{2})\.lmn\/(engine-\d{1,2}).yaml:.+- (.+)|\1;\2;\3|g" |sort'
  
  done # end CM    
  </code></pre>
  
  <p>done</p>
  
  <p>which gives me an output in the form of:</p>
  
  <pre><code>a04
  ghf04;engine-1;null
  ghf04;engine-1;Michael
  ghf04;engine-1;Hardy
  </code></pre>
  
  <p>I want to remove lines containing null from the grep loop. So where do I put the grep -v in the perl command? Tried few things like below but didnt work:</p>
  
  <pre><code>ssh $j$i 'grep -P ".+(- .+)" abc/engine*yaml | perl -pe     "s|\abc\/(ghf\d{2})\.lmn\/(engine-\d{1,2}).yaml:.+- (.+)|\1;\2;\3|g" |grep -v ghf.+null |sort'
  </code></pre>