API Interaction Scripts
📖 Scenario: You work in a small company that needs to get weather information from an online service. You will write a simple Bash script to interact with a public weather API to get the current temperature for a city.
🎯 Goal: Build a Bash script that fetches weather data from an API and shows the temperature for a specific city.
📋 What You'll Learn
Create a variable with the city name
Create a variable with the API endpoint URL
Use
curl to get the weather dataExtract the temperature value from the JSON response using
jqPrint the temperature with a friendly message
💡 Why This Matters
🌍 Real World
Many jobs require fetching data from online services using scripts. This project shows how to automate getting live data like weather.
💼 Career
Scripting API calls is a common task for system administrators, developers, and data analysts to automate data retrieval and processing.
Progress0 / 4 steps