+ Moved rateUSD.sh to .local/bin (To save up even more word count)
This commit is contained in:
parent
db0be00c2a
commit
cda9be2bf2
5 changed files with 8 additions and 12 deletions
6
.local/bin/custom/rateUSD
Executable file
6
.local/bin/custom/rateUSD
Executable file
|
@ -0,0 +1,6 @@
|
|||
# get rate value from cnbcindonesia.com
|
||||
[ ! "$(stat -c %y ~/.cache/rateUSD.txt 2> /dev/null | cut -d' ' -f1)" = "$(date "+Y-%m-%d")" ] &&
|
||||
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 > ~/.cache/rateUSD.txt
|
||||
|
||||
# display rateUSD.txt while replace mark_val with Kurs USD -> IDR:
|
||||
sed 's/mark_val/Kurs USD -> IDR:/' ~/.cache/rateUSD.txt; echo "Sumber: CNBC Indonesia"
|
Loading…
Add table
Add a link
Reference in a new issue