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
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.
Shell example:
install_dir=`grep install /tmp/my_info.txt | cut -d"/" -f4`
cd /dev/install_dir