title: Remote execution - 2 command outputs in same line
body: <p>shell#printf "<code>hostname</code> <code>rpm -qa | grep rhncfg-actions</code>\n"
       usmnxbox01 rhncfg-actions-5.10.85-1.el6.noarch</p>
  
  <p>I am trying the get the above output using ssh from multiple hosts using the command below.</p>
  
  <pre><code>for i in `cat ahosts`; do ssh -t $i "printf "`hostname` `rpm -qa | grep rhncfg-actions`\n"" 2&gt;/dev/null;done
  </code></pre>
  
  <p>but I get the hostname of the system am I running this command on.</p>