Code: Select all
#!/bin/bash
# Generic MQTT send script
# $1 = topic
# $2 = message
mosquitto_pub -h 192.168.1.xxx -t $1 -m $2
This works fine if I call it from Blockly with a simple argument like TestMessage
If the message argument contains comma's and is enclosed within double quotes, the script returns error 256
How do I correctly pass an argument that contains comma's ?