From 844ce9ddefb273ed28d4770ba51711514137d5b7 Mon Sep 17 00:00:00 2001 From: Miles Alan Date: Mon, 29 Jun 2020 15:24:10 -0500 Subject: [PATCH] Plus prefix strip numbers before storing into modem log --- scripts/modem/sxmo_modemcall.sh | 2 +- scripts/modem/sxmo_modemmonitor.sh | 2 +- scripts/modem/sxmo_modemtext.sh | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/modem/sxmo_modemcall.sh b/scripts/modem/sxmo_modemcall.sh index 52bb4f4..0d955d3 100755 --- a/scripts/modem/sxmo_modemcall.sh +++ b/scripts/modem/sxmo_modemcall.sh @@ -34,7 +34,7 @@ vid_to_number() { mmcli -m "$(modem_n)" -o "$1" -K | grep call.properties.number | cut -d ':' -f2 | - tr -d ' ' + tr -d ' +' } log_event() { diff --git a/scripts/modem/sxmo_modemmonitor.sh b/scripts/modem/sxmo_modemmonitor.sh index b981e05..d515d36 100755 --- a/scripts/modem/sxmo_modemmonitor.sh +++ b/scripts/modem/sxmo_modemmonitor.sh @@ -50,7 +50,7 @@ checkforincomingcalls() { mmcli -m "$(modem_n)" --voice-list-calls -o "$VOICECALLID" -K | grep call.properties.number | cut -d ':' -f 2 | - tr -d ' ' + tr -d ' +' ) # Log to /tmp/incomingcall to allow pickup and log into modemlog diff --git a/scripts/modem/sxmo_modemtext.sh b/scripts/modem/sxmo_modemtext.sh index b23700c..adbc6a3 100755 --- a/scripts/modem/sxmo_modemtext.sh +++ b/scripts/modem/sxmo_modemtext.sh @@ -52,7 +52,7 @@ sendtextmenu() { awk NF | sxmo_dmenu_with_kb.sh -p "Number" -fn "Terminus-20" -l 10 -c | cut -d: -f1 | - tr -d -- '- ' + tr -d -- '-+ ' )" echo "$NUMBER" | grep -E "^Cancel$" && exit 1 echo "$NUMBER" | grep -qE '^[+0-9]+$' || err "That doesn't seem like a valid number"