You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
resp=$(curl -s "${api_url}?q=${city}&appid=${api_key}&units=metric") #${api_url}?q=${city} send a request to openweathermap adn in that to the api_key also requestion the output in metric units
temperature=$(echo "$resp" | jq -r ".main.temp") # using jq to extract the temperature obtained from the response
echo "The temperature in $city is $temperature Celsius"