title: To read values from file using grep/awk/sed commands from linux terminal
body: <p>i have to read values from file test.txt where it contains</p>
  <pre><code>test.txt
  
  parameters()-&gt;getParm (&amp;randomNumberSeed, &quot;-seed&quot;);
  parameters()-&gt;getParm( &amp;withInit, &quot;-withInit&quot;);
  parameters()-&gt;getParm( &amp;useTotalSpace, &quot;-useTotalSpace&quot;);
  parameters ()-&gt;getParm (unitSize, &quot;-unitSize&quot;);
  parameters ()-&gt;getParm(&amp;randomRaid,&quot;-randomRaid&quot;);
  parameters()-&gt;getParm(&amp;spares, &quot;-spares&quot;);
  parameters()-&gt;getParm( &amp;transferType, &quot;-transferType&quot;);
  parameters()-&gt;getParm(&amp;withBmicEvents, &quot;-withBmicEvents&quot;);
  parameters()-&gt;getParm(&amp;bmicSleepSeconds, &quot;-bmicWaitTime&quot;);
  
  int main (int argc, char *argv[])
  {
     static beyond test (argc, argv);
     return test.start ();
  }
  </code></pre>
  <p>The result i am expecting from text file is</p>
  <pre><code>expected output:-
   
  randomNumberSeed  -seed
  withInit          -withInit
  useTotalSpace     -useTotalSpace
  unitSize          -unitSize
  randomRaid        -randomRaid
  spares            -spares
  transferType      -transferType
  withBmicEvents    -withBmicEvents
  bmicSleepSeconds  -bmicWaitTime
  </code></pre>
  <p>I am using this command to get my result... where i am not getting result needed. please help me to get my result.</p>
  <pre><code>cat test.txt | grep getParm | sed 's/getParm(/  /;s/&amp;/  /;s/,/  /;s/\&quot;/  /g' | awk  '{print  $2 &quot;\t&quot;  $3}'
  
  (       randomNumberSeed
  withInit        -withInit
  useTotalSpace   -useTotalSpace
  ()-&gt;getParm     (unitSize
  ()-&gt;    randomRaid
  spares  -spares
  transferType    -transferType
  withBmicEvents  -withBmicEvents
  bmicSleepSeconds        -bmicWaitTime
  </code></pre>