1234567891011121314 |
- #!/bin/bash
- ROOT=$(cd `dirname $0`/../../; pwd)
- TOPIC=topic1
- 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\":\"topic1 message\", \"date\":\"$DATE\", \"priority\":1}"
- echo MSGS: $MSG
- # curl -d "$MSG" $URL
- DATE_STRING="date='$DATE'"
- $ROOT/build/bat POST $URL msg="topic1 message" $DATE_STRING priority=1
|