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 ace8592..008f716 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.