aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHari Hendaryanto <hari.hendaryanto@gmail.com>2018-09-22 11:27:47 +0700
committerHari Hendaryanto <hari.hendaryanto@gmail.com>2018-09-22 11:27:47 +0700
commit8702e30a619b18353ec3e47c832a737d850c1765 (patch)
tree2edddf73a98e0cdebc80574844640d19cf90a71b
parent3fd88db08dcd943dfd587b38559845851147bb51 (diff)
Remove leading whitespaces and subtitute with a newline feed
-rw-r--r--e3372-readsms.sh4
1 files changed, 1 insertions, 3 deletions
diff --git a/e3372-readsms.sh b/e3372-readsms.sh
index 2371de9..fbf44b6 100644
--- a/e3372-readsms.sh
+++ b/e3372-readsms.sh
@@ -9,8 +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')
-
-#message=$(echo $message | sed -e 's/^[[:space:]]*//')
+message=$(grep -r Content modem_status.xml | sed -e 's/<[^>]*>//g' | sed "s/^[ \t]*/\n/g")
echo "$message\n"