# Convert a csv with cctv location data to a json file # This was used for a one-off task to convert the static csv file we manually produced into json # Sample invocation: awk -F',' -f awkpgm1 filename //{printf " {\n \"cctv\":\n {\n \"index\": \"%s\",\n \"location\":\n {\n \"locationName\": \"%s\",\n \"longitude\": \"%s\",\n \"latitude\": \"%s\",\n \"nearVDS\": \"%s\"\n }\n }\n },\n", $7, $6,$4,$5,$8 } # # When finished prepend: #{ # "data": # [ # # and Append: # ] }