#!/bin/bash SPAM_DELAY=1; while : do mosquitto_pub -h hostname -t /test/topic -m 'test playload' sleep $SPAM_DELAY; done