#!/bin/bash # Convert csv to json using awk pgm # Get input filename from command line if [ "$#" -ne 1 ] then echo "argument required: provide input csv filename of prepped postmile file" exit 1 fi echo "{" echo " \"type\": \"FeatureCollection\"," echo " \"features\": [" awk -F',' -f csvToJson.awk $1 echo " ]" echo "}" # NB: You need to manually remove the comma after the last feature.