#!/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 $ROOT/build/curl -d "$MSG" -h $URL