Skip to content

Latest commit

 

History

History
29 lines (19 loc) · 695 Bytes

get-weather-information-from-the-command-line.md

File metadata and controls

29 lines (19 loc) · 695 Bytes

Get Weather Information From The Command Line

Category: Linux

You can get weather information from the command line using curl from the site https://wttr.in

For example, the following will obtain weather for New York:

curl wttr.in/"New York"

Obtain weather for three different locations at once using short format:

curl -s "wttr.in/{Auckland,Wellington,Christchurch}?format=3"

Output:

Auckland: ⛅️  +11°C
Wellington: ⛅️  +9°C
Christchurch: ☀️ +3°C

If you omit the location you will get the report for your current location based on your IP address.

See chubin/wttr.in for more details.