diff options
author | Hari Hendaryanto <hari.hendaryanto@gmail.com> | 2018-09-22 11:27:47 +0700 |
---|---|---|
committer | Hari Hendaryanto <hari.hendaryanto@gmail.com> | 2018-09-22 11:27:47 +0700 |
commit | 8702e30a619b18353ec3e47c832a737d850c1765 (patch) | |
tree | 2edddf73a98e0cdebc80574844640d19cf90a71b /e3372-readsms.sh | |
parent | 3fd88db08dcd943dfd587b38559845851147bb51 (diff) |
Remove leading whitespaces and subtitute with a newline feed
Diffstat (limited to 'e3372-readsms.sh')
-rw-r--r-- | e3372-readsms.sh | 4 |
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" |