Skip to content

Instantly share code, notes, and snippets.

@artkpv
Created April 24, 2021 13:24
Show Gist options
  • Save artkpv/3cbff1819846a4eec132be21a1fbd63d to your computer and use it in GitHub Desktop.
Save artkpv/3cbff1819846a4eec132be21a1fbd63d to your computer and use it in GitHub Desktop.
Скрипт для получения курса валют на заданную даты из Центробанка
DATE=02/03/2002
CURR=USD
export LANG=ru_RU.CP1251
curl 'http://www.cbr.ru/scripts/XML_daily.asp?date_req='$DATE -s | grep -Po $CURR'.*?Value>[^<]*' | sed -En -e 's/.*>([0-9,]*)/\1/gp' -
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment