Skip to content

Instantly share code, notes, and snippets.

@dewomser
Last active June 3, 2024 16:59
Show Gist options
  • Save dewomser/9930519a17b251bea891d33a56ddf27f to your computer and use it in GitHub Desktop.
Save dewomser/9930519a17b251bea891d33a56ddf27f to your computer and use it in GitHub Desktop.
Luftqualität Stadt in Deutschland / Bash Einzeiler
readarray -td ";" lq <<< $(curl "https://www.umweltbundesamt.de/api/air_data/v2/airquality/csv?date_from=$(date +%F)&time_from=$(($(date +%H)-1))&date_to=$(date +%F)&time_to=$(date +%H)&station=1460&lang=de"| grep -m1 DERP023) ; echo ${lq[5]}
@dewomser
Copy link
Author

dewomser commented Feb 20, 2023

Beispiel ist für Worms. station=1460
Achtung ! Bei Sommerzeit … $(date +%H)-2… (2 Stunden zurück)
Du brauchst nur die ID deiner gewünschten Messstation abändern ->fertig

@pizofreude
Copy link

Interessant. Es wäre prima, wenn man auch für andere Länder wünschen kann 🙂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment