rtpub1.sh 224 B

123456789
  1. #!/bin/bash
  2. ROOT=$(cd `dirname $0`/../../; pwd)
  3. TOPIC=test
  4. URL=http://127.0.0.1:8051/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