I made a simple "bot" (a one-liner in a cron job) that sends to a chat group some fortunes.
But when the fortune cookie has quotes, the bot just send text until the first quote, then it breaks.
The command currently being draft is:
MSG1=`/usr/games/fortune` ; \
curl -s -X POST -H 'Content-Type: application/json' --data-binary "{\"chat_id\": \"$CHATID\", \"text\": \"${MSG1}\"}" "https://api.chatter1.com/tok/$TOKEN/Message"
I've tried many combinations of single-quote and double-quote, to no avail. I hope you guys could be creative to solve this one-liner.
Thanks.