I am using this line of code:
code=$(curl -ks -o /dev/null -i -w 'Status: ''%{http_code} -X GET www.goog.com
but I want to change the curl to use proxy 127.0.0.1:8080 but without changing the above code. I want to use a variable that will change it on the go.
code=$(curl -x 127.0.0.1:8080 -ks -o /dev/null -i -w 'Status: ''%{http_code} -X GET www.goog.com