From: Michael Tremer Date: Sun, 19 May 2013 18:30:31 +0000 (+0200) Subject: modem: Don't log empty lines. X-Git-Tag: 007~124 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=daa5599a7beb8ff7c1b7aee6aec1ffba132cf230;p=network.git modem: Don't log empty lines. --- diff --git a/functions.modem b/functions.modem index 8b115fca..ab9f587a 100644 --- a/functions.modem +++ b/functions.modem @@ -104,15 +104,14 @@ function __modem_chat_process_output() { local counter=0 local line - while read line; do - log DEBUG "Output[${counter}]: ${line}" - + while read -r line; do # Also skip empty lines. [ -n "${line}" ] || continue # Ignore all volatile messages. [ "${line:0:1}" = "^" ] && continue + log DEBUG "Output[${counter}]: ${line}" counter=$(( ${counter} + 1 )) # Skip the first line, because that's out command.