Bitcoin bash script (Bash script price ticker)
In this post, i will show you how to create your own Bitcoin price ticker, in 3 different currencies. It's a bash script so this tutorial is mainly intended for Linux users.
A while back, i was browsing the web to find a bash script that gave the price of Bitcoin instantly. I did find one created by David Walsh. https://davidwalsh.name/bitcoin
This script uses the coinsdesk api but after giving the result, it goes back to prompt right away. What i wanted was a script that didn't go back to prompt but would refresh the price every 5 seconds. I also wanted to have the price not only in US dollars but also in Euro and Great Britain Pound. So here's how to achieve this.
Open terminal and type the following:
nano btc.sh
Then, go to my github. https://gist.github.com/teklordz/1851b5693b338d4365d8#file-coindesk-sh
copy the code and paste in terminal.
Next, save the script with Ctrl + x then y then press enter. You must now make it executable with the following:
chmod +x btc.sh
Now you can launch the script and it will refresh (restart) every 5 seconds. Just type ./btc.sh in terminal and the script will start. You can reduce the size of your terminal window and leave it in a corner of your screen and have instant access to the average price of Bitcoin.
Hope you liked this tutorial. Have a great day everyone!
nice job !
interesting. can i convert it to Indonesian Rupiah?