From daa5599a7beb8ff7c1b7aee6aec1ffba132cf230 Mon Sep 17 00:00:00 2001 From: Michael Tremer Date: Sun, 19 May 2013 20:30:31 +0200 Subject: [PATCH] modem: Don't log empty lines. --- functions.modem | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) 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. -- 2.39.2