Skip to content

Instantly share code, notes, and snippets.

@stephenlb stephenlb/subscribe.sh
Last active Jul 10, 2019

Embed
What would you like to do?
Bash and Shell Command PubNub Subscribe in One Line - Basic TCP Subscribe Calls
## =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
## URL Variables
## http://p.pubnub.com/stream/<SUBKEY>/<CHANNEL>/0/-1
## =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
## Demo Stream
while true; do (printf 'GET http://p.pubnub.com/stream/sub-c-5f1b7c8e-fbee-11e3-aa40-02ee2ddab7fe/pubnub-sensor-network/0/-1 HTTP/1.1\r\nHost: pubnub\r\n\r\n'; sleep 5) | nc p.pubnub.com 80; done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.