Files
log_collection_docker/data/apidemo-cron/scripts/get_cryptocurrency.sh
2022-12-27 21:59:06 +01:00

6 lines
245 B
Bash

#!/bin/bash
DATE=`date +"%Y-%m-%d"`
curl https://api.coindesk.com/v1/bpi/currentprice.json > /tmp/cryptocurrency.json
jq -c 'del(.disclaimer)' /tmp/cryptocurrency.json >> /opt/output/cryptocurrency_$DATE.json
find /opt/output/ -mtime +5 -delete