title: How do I assign a value to a variable inside my chef recipe at runtime
body: <p>In scripting languages like shell/perl, I could use variables to get a specific directory name at run time which can be used in the script. But inside a chef recipe how do I make use of variables without passing them as parameters</p>
  
  <p>I want to assign output of a shell command line to a variable- How do I achieve it within a chef recipe. I am using chef-solo.</p>
  
  <p>Shell example:</p>
  
  <pre><code>install_dir=`grep install /tmp/my_info.txt | cut -d"/" -f4`
  cd /dev/install_dir
  </code></pre>