Commit 7cc3f99d authored by Christian Rüb's avatar Christian Rüb

add update rate script

parent 2573be90
#!/bin/bash
FROM=EUR
TO=THB
RATE=$( wget --quiet 'http://download.finance.yahoo.com/d/quotes.csvr?e=.csv&f=l1&s='${FROM}${TO}'=X' -O - )
if [ $? -eq 0 ]; then
if echo ${RATE} | grep -q '^0.00'; then
echo "invalid value" >&2
else
echo "Rate: $RATE" >&2
sed -e 's/rate[[:space:]]*=.*/rate='$RATE'/' -i "$HOME/.config/QCurrency/QCurrency.conf"
fi
else
echo "request failed" >&2
fi
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment