How to assign a output of curl command execution to a variable, below is the curl example.
SCAN=$(curl -u service.account$\ --connect-timeout 3 -k -o -I -L -s -w "%{url_effective} \t %{http_code} \t %{time_total}" \n"
1) Variable1 = URL effective
2) Variable2 = Effective URL
3) Variable3 = Time Consumed