So, lets say I have the following command:
curl -I http://google.com | head -n 1| cut -d $' ' -f2
This will capture the http status code?? Now I want to assign this to variable.. in bash script
like output = "curl -I http://localhost:8088/tracks?key=9 | head -n 1| cut -d $' ' -f2"
or something like that..
How do I assign the response of above command to a variable called output in bash? Thanks