Forum Discussion
nmrao
10 years agoCommunity Hero
Glad know about node plugin to transfrom csv to json.
zsousa
10 years agoContributor
Thanks I will try it
- zsousa10 years agoContributor
that was for windows how about MAC?
- nmrao10 years agoCommunity Hero
Try changing first line to:
def command = ["/bin/sh", "csvtojson", "/tmp/mydata.csv"]if your shell is bash - use "/bin/bash"
- zsousa10 years agoContributor
ok, I have the below code now but what is the equivalent of Runtime on unix ?
String command = ["/bin/bash", "/Users/zsousa/APIDevelopment/apitests/node-csvtojson-master/temp/runGroovy1.groovy"]
Process child = Runtime.getRuntime().execute(command)
//InputStream in1 = child.getInputStream()
//def json = in1.text
//in1.close()
//child.waitFor()
//log.info json