rtpub.sh 264 B

12345678910
  1. #!/bin/bash
  2. ROOT=$(cd `dirname $0`/../../; pwd)
  3. TOPIC=test1
  4. URL=http://127.0.0.1:9051/pub?topic=$TOPIC
  5. echo url: $URL
  6. DATE=$(date "+%Y-%m-%d %H:%M:%S").$((`date "+%-N"`/1000000))
  7. echo date: $DATE
  8. # curl -d 'hello world 1' $URL
  9. $ROOT/build/bat POST $URL msg=hello