From 8702e30a619b18353ec3e47c832a737d850c1765 Mon Sep 17 00:00:00 2001 From: Hari Hendaryanto Date: Sat, 22 Sep 2018 11:27:47 +0700 Subject: Remove leading whitespaces and subtitute with a newline feed --- e3372-readsms.sh | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'e3372-readsms.sh') 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" -- cgit v1.2.3