Skip to content

Instantly share code, notes, and snippets.

@timka
Last active February 20, 2022 15:53
Show Gist options
  • Save timka/da59a00f690e42f8a151d1c471781e96 to your computer and use it in GitHub Desktop.
Save timka/da59a00f690e42f8a151d1c471781e96 to your computer and use it in GitHub Desktop.
Try all CSV sources from budget.gov.ru/opendata
curl -s 'http://budget.gov.ru/opendata/list.json' \
| jq '.meta[]|.link' -r \
| xargs curl -s \
| jq '.data[] | .source' -r \
| cut -d' ' -f1 \
| uniq \
| grep -E '.*\.csv$' \
| while read url ; do
echo -n "$url:\t"
curl -s "$url" \
| head -5 \
| jq -cR 'split(";")' \
>/dev/null \
&& echo
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment