Hi I want to store output of a shell command into chef variable. I have seen some way but not able to get how to do it.
Here is what I have tried so far
current_version = `#{node['kayako_nginx']['prefix']}/sbin/nginx -v | grep -Po "(\d+\.\d+\.\d+)"`
print "cheking version of nginx #{current_version}"
it is executing command but not storing it
this is the output while executing chef
nginx version: nginx/1.5.3
cheking version of nginx