home · contact · privacy
Update awk with quotes now added to fields in CSV.
authorChristian Heller <c.heller@plomlompom.de>
Tue, 21 Jul 2020 17:07:11 +0000 (19:07 +0200)
committerChristian Heller <c.heller@plomlompom.de>
Tue, 21 Jul 2020 17:07:11 +0000 (19:07 +0200)
update.sh

index ace8592a60902c614e510a2b6020621981b734f2..008f716e732607204655ffd7e0529d44b21e99c0 100755 (executable)
--- a/update.sh
+++ b/update.sh
@@ -14,7 +14,7 @@ fi
 today="$(date +%Y-%m-%d)"
 curl "${CSV_URL}" \
 | awk 'BEGIN { FS=";"; ORS=""; print "'${today}'" }; '\
-'!/^Bezirk/ { printf "%4d", $3 }; '\
+'!/^"Bezirk"/ { printf "%4d", $3 }; '\
 'END { printf "\n" }' "${filename}" >> "${table_path}"
 
 # Write enhanced table output to directory served by web server.