rtpub.sh 243 B

123456789
  1. #!/bin/bash
  2. ROOT=$(cd `dirname $0`/../../; pwd)
  3. TOPIC=测试2
  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. $ROOT/build/curl -d 'hello world 1' -h $URL