1234567891011121314 |
- #!/bin/bash
- ROOT=$(cd `dirname $0`/../../; pwd)
- TOPIC=topic2
- URL=http://127.0.0.1:9051/pub?topic=$TOPIC
- echo url: $URL
- DATE=$(date "+%Y-%m-%d-%H_%M_%S").$((`date "+%-N"`/1000000))
- echo date: $DATE
- MSG="{\"msg\":\"topic2 message\", \"date\":\"$DATE\", \"priority\":2}"
- echo MSGS: $MSG
- # curl -d "$MSG" $URL
- DATE_STRING="date='$DATE'"
- $ROOT/build/bat POST $URL msg="topic2 message" $DATE_STRING priority=2
|