#!/usr/bin/bash URL="https://raw.githubusercontent.com/nayarsystems/posix_tz_db/master/zones.csv" ( first=1 echo "{\"timezones\": {" curl --silent "$URL" | while read line; do [ $first -ne 1 ] && echo "," first=0 echo -n "${line/\",\"/\":\"}" done echo echo "}}" ) > src/webinterface/timezones.json