---
title: "Know Your Weather From Terminal"
description: "Here is a small trick i tired to find the weather from the terminal. The simple code below , gives you the update of current."
url: "https://h3manth.com/scribe/know-your-weather-terminal/"
canonical_url: "https://h3manth.com/scribe/know-your-weather-terminal/"
markdown_url: "https://h3manth.com/scribe/blog/know-your-weather-terminal.md"
publishDate: "2009-07-15T00:00:00.000Z"
author: "Hemanth HM"
category: "linux"
tags: ["bash","web"]
word_count: 124
reading_time_minutes: 1
x_markdown_tokens: 277
content_signal: "ai-train=yes, search=yes, ai-input=yes"
---

# Know Your Weather From Terminal

> Here is a small trick i tired to find the weather from the terminal. The simple code below , gives you the update of current.

Here is a small trick i tired to find the weather from the terminal. The simple code below , gives you the update of current weather in Bangalore. You may change it to your place by changing the feed as per requirement.

Follow these steps :

``

$ sudo vi ~/.bashrc

Add this at the last :

alias tmp="curl -s --connect-timeout 30 "http://newsrss.bbc.co.uk/weather/forecast/1193/ObservationsRSS.xml" | grep "Temperature" | sed -e 's/°/ deg /g' | sed -e 's/%/%/g'| sed 's/<[>]*>//g'"

Save and close the file .

Now , source ~/.bashrc Then, $ tmp Temperature: 22 deg C (72 deg F), Wind Direction: W, Wind Speed: 11mph, Relative Humidity: 86%, Pressure: N/A, no change, Visibility: Good

Indeed it's a pleasant weather here in Bangalore (India) today :)
