In my bash script I have the following line
[backtick]mosquitto_pub -t '/$location/
[backtick]
With this I want to 'publish' to the MQTT stream. The publishing part works great but it takes the variable name $location
literally, and doesn't substitute $location
with the initialized value for like NYC
,Paris
or Tokyo
.
Q: How can make it so that the assigned value/string gets substituted to $location
when the code is executed
Aucun commentaire:
Enregistrer un commentaire