title: Storing query result in a variable
body: <p>I have a query whose result I wanted to store in a variable 
  How can I do it ?
  I tried </p>
  
  <pre><code>./hive -e  "use telecom;insert overwrite local directory '/tmp/result' select
  avg(a) from abc;"
  
  ./hive --hiveconf MY_VAR =`cat /tmp/result/000000_0`;
  </code></pre>
  
  <p>I am able to get average value in MY_VAR but it takes me in hive CLI which is not required
  and is there a way to access unix commands inside hive CLI?</p>