title: Not able to redirect file content to a variable in %post part of the rpm spec
body: <p>In the %post part of my spec file I am executing a binary which write a string into stdout. Now I want to capture that output string into a variable. But my variable is always null. Alternatively I am able to write the output into a file. But again not able to read it back into a variable. I want to redirect the output the binary into a variable or reading contents of a file into a variable would also work for me.</p>
  
  <p>I tired in the spec file:</p>
  
  <pre><code>%post
  /var/tmp/%{_installer_file} |&amp; tee /var/tmp/status.txt
  STATUS=`cat /var/tmp/status.txt`
  echo "------------ status = $STATUS"
  </code></pre>
  
  <p>STATUS variable should be catching the string present in the status.txt file.</p>
  
  <p>No error displaying.</p>