Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagebash
#!/bin/bash
while read f1 f2 f3 f4 f5 f6
  do 
     t="$f2"T"$f3":00Z\
     v=$f6
#     echo $t
#     echo $v
     s="{\"result\":\""$v"\",\"phenomenonTime\":\""$t"\",\"Datastream\":{\"@iot.id\":<id_of_Datastream>}, \"FeatureOfInterest\":{\"id\":<id_of_FeatureOfInterest>}}"
#     echo $s
     curl --request POST \
	     --data "${s}" \
	     --header "Content-Type: application/json" \
	 http://chashuhotpotscratchpad.sensorup.com/OGCSensorThings/v1.0/Observations
done < file

...