DEV Community

Cover image for Get weather information on Terminal
Anurag Rana
Anurag Rana

Posted on

2

Get weather information on Terminal

You can get weather information of your area in your terminal.

You need to send a curl request on URL wttr.in/$1?m1

curl -s "wttr.in/$1?m1"

You can add this to your .bashrc file as a command.

weather(){ curl -s "wttr.in/$1?m1"}

To get the information of 3 days: curl -s "wttr.in"

More from Author:

Top comments (1)

Collapse
 
anuragrana profile image
Anurag Rana

Try curl https://www.pythoncircle.com/ascii/logo/

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs