source: tmcsimulator/trunk/webapps/cptms/data_layers/convertCSVtoJSON.bash @ 318

Revision 318, 396 bytes checked in by jdalbey, 7 years ago (diff)

Move prep scripts to data layer folder

  • Property svn:executable set to *
Line 
1#!/bin/bash
2# Convert csv to json using awk pgm
3# Get input filename from command line
4if [ "$#" -ne 1 ]
5then
6  echo "argument required: provide input csv filename of prepped postmile file"
7  exit 1
8fi
9
10echo "{"
11echo " \"type\": \"FeatureCollection\","
12echo " \"features\": ["
13awk -F',' -f csvToJson.awk $1
14echo " ]"
15echo "}"
16# NB: You need to manually remove the comma after the last feature.
Note: See TracBrowser for help on using the repository browser.