Warning: Can't use blame annotator:
svn blame failed on trunk/src/cptms/convertCSVtoJSON.bash: ("Can't find a temporary directory: Internal error", 20014)

source: tmcsimulator/trunk/src/cptms/convertCSVtoJSON.bash @ 284

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

Create new folder fo CPTMS including html, bash, and python scripts, and data files

  • Property svn:executable set to *
RevLine 
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.