dotfiles/.scripts/rateUSD.sh
ziro 57c06d99ce + Use dwmblocks on dwm
+ Added free disks indicator to polybar
+ Trying out lfimg (Buggy)
+ Rework rateUSD
+ Rework PATH, now detect any subdir inside .local/bin
+ lf now can be accessed inside vim
2020-05-18 12:48:22 +07:00

4 lines
407 B
Bash
Executable file

# get rate value from cnbcindonesia.com
curl -s "https://www.cnbcindonesia.com/market-data/currencies/IDR=/USD-IDR" | grep -A1 'class="mark_val"' | cut -d'"' -f2 | cut -d'<' -f2 | cut -d'>' -f2 > /tmp/rateUSD.txt
# if rateUSD.txt exist then display it while replace mark_val with Kurs USD -> IDR:
[ -f /tmp/rateUSD.txt ] && sed 's/mark_val/Kurs USD -> IDR:/' /tmp/rateUSD.txt; echo "Sumber: CNBC Indonesia"