Hello,
No, mosquitto_sub does not have a command line option for writing to a
file. However it can be achieved by redirecting STDOUT to a file, using
the shell:
mosquitto_sub -t 'foo/bar' -C 1 -N > file.out
The -C 1 option causes the command to exit after a single message (to
avoid writing multiple images to the file).
The -N option causes the command to not append an end of line character
to the payload
nick.
> --
> To learn more about MQTT please visit
http://mqtt.org
> ---
> You received this message because you are subscribed to the Google
> Groups "MQTT" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to
mqtt+uns...@googlegroups.com.
> To post to this group, send email to
mq...@googlegroups.com.
> Visit this group at
https://groups.google.com/group/mqtt.
> For more options, visit
https://groups.google.com/d/optout.