Currency converter for your Linux terminal

by John
Published on: July 3, 2011
Categories: How To
Tags: No Tags
Comments: 1 Comment

Would you like to have your personalized currency converter in your Linux terminal? will you have it, very simple this one uses the Google Currency Converter.

  • Fire up your terminal and open .bashrc with your favorite editor.
    $ sudo nano .bashrc
  • Copy and paste the code below.
    cc() { wget -qO- "http://www.google.com/finance/converter?a=$1&from=$2&to=$3&hl=es" | sed '/res/!d;s/<[^>]*>//g'; }

    note: to save just press ctrl+o then ctrl+x

  • Now update your .bashrc
    $ source .bashrc

Now lets test your converter, usage format: (cc amount from_denomination to_denomination).

$ cc 1 aed php
output will be 1 AED = 11.7533 PHP

Now try it and share!

  • http://usb3gvn.com USB 3G

    I agree with you. I’m please can you help me as I can find the imformation I need. Thank you very much!



Celebrate SFD with us on September 15! I'll be celebrating 20 years of Linux with The Linux Foundation!

RECENT COMMENTS


Welcome , May 26, 2013