#!/bin/bash topic=$1 message=$2 #topic=$(echo ${line}|cut -d\ -f 1) #message=$(echo ${line}|cut -d\ -f 2) /usr/bin/mosquitto_pub -h 10.8.0.1 -t "${topic}" -m ${message}