rtpub2.sh 226 B

123456789
  1. #!/bin/bash
  2. ROOT=$(cd `dirname $0`/../../; pwd)
  3. TOPIC=topic2
  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