From 7e287251179aef8867ea4310c17971dd4517fd5d Mon Sep 17 00:00:00 2001 From: Hari Hendaryanto Date: Sat, 22 Sep 2018 12:33:28 +0700 Subject: Read sms phonenumber and some lazy formating. But it's good on console :D --- e3372-readsms.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/e3372-readsms.sh b/e3372-readsms.sh index 82a1595..38d980f 100644 --- a/e3372-readsms.sh +++ b/e3372-readsms.sh @@ -9,6 +9,6 @@ curl -s -X POST "http://$MODEM_IP/api/sms/sms-list" -H "Cookie: $COOKIE" -H "__R #cat modem_status.xml -message=$(grep -r Content modem_status.xml | sed -e 's/<[^>]*>//g' | sed -e 's/^[ \t]*/\n/g') +message=$(grep -r -E 'Phone|Content' modem_status.xml | sed -e 's/<[^>]*>//g' | sed -e 's/^[ \t]*/------\n/g') -echo "$message\n" +echo "$message\n------" \ No newline at end of file -- cgit v1.2.3