~alpine/aports

[PATCH sxmo-utils v5 4/8] fix sending sms containing quotes

Details
Message ID
<20201010135935.19235-4-reedwade@misterbanal.net>
DKIM signature
missing
Download raw message
Patch: +2 -1
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
Reply to thread Export thread (mbox)