Signed-off-by: Reed Wade <reedwade@misterbanal.net>
---
scripts/modem/sxmo_modemsendsms.sh | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/scripts/modem/sxmo_modemsendsms.sh b/scripts/modem/sxmo_modemsendsms.sh
index 9910dae..df40ae9 100755
--- a/scripts/modem/sxmo_modemsendsms.sh
+++ b/scripts/modem/sxmo_modemsendsms.sh
@@ -32,10 +32,11 @@ else
TEXT="$@"
fi
+TEXT="$(echo "$TEXT" | sed "s/\"/'/g" | sed "s/\`/'/g")"
TEXTSIZE="${#TEXT}"
SMSNO="$(
- mmcli -m "$MODEM" --messaging-create-sms="text='$TEXT',number=$NUMBER" |
+ mmcli -m "$MODEM" --messaging-create-sms="text=\"$TEXT\",number=$NUMBER" |
grep -o "[0-9]*$"
)"
mmcli -s "${SMSNO}" --send || err "Couldn't send text message"
--
2.28.0