I am trying to automate a GroupMe bot as simply as possible. An easy way to send a message from the command line is to use the following command:
curl -d '{"text" : "Your message here", "bot_id" : "this_is_a_secret_string"}' https://api.groupme.com/v3/bots/post
In a Shell script, I would like to replace "Your message here"
with var
, in which var
is being set to the output from a different command. Is this possible?
Things I have replaced "Your message here" with that did not work:
var
$var
(var)
$(var)
{var}
${var}
Anything put within double quotes ("") is treated as a String, so did not try much in those regards.