Set TEXT of a virtual text device with spaces
Posted: Tuesday 15 March 2016 18:42
I'm trying to set the value of the TEXT virtual device using bash and curl, the value having spaces.
I have no problems with the following command in a brower
However when using this code
Only the first word is displayed. I tried many things including escaping the single quote. At best only the first word of the message is displayed, or using many other solutions I tried an error is trigerred on the server side.
Any clue?
Thank you
I have no problems with the following command in a brower
Code: Select all
http://192.168.21.240:8080/json.htm?type=command¶m=udevice&idx=217&nvalue=0&svalue=Please power ON this gear
Code: Select all
message="Please power on this gear"
messageIDX=217
curl --silent $DOMOTICZSERVER:$DOMOTICZPORT'/json.htm?type=command¶m=udevice&idx='$messageIDX'&nvalue=0&svalue='$message
Any clue?
Thank you