From 1ad23a065eca674b530b26542c12095045db9cbc Mon Sep 17 00:00:00 2001 From: Promofaux Date: Sun, 22 Jan 2017 20:38:46 +0000 Subject: [PATCH] switch out `wc -l` with `grep -c ^` --- advanced/Scripts/piholeDebug.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/advanced/Scripts/piholeDebug.sh b/advanced/Scripts/piholeDebug.sh index c961f103..fae667ce 100755 --- a/advanced/Scripts/piholeDebug.sh +++ b/advanced/Scripts/piholeDebug.sh @@ -361,13 +361,13 @@ files_check "${ADLISTFILE}" header_write "Analyzing gravity.list" - gravity_length=$(wc -l "${GRAVITYFILE}") \ + gravity_length=$(grep -c ^ "${GRAVITYFILE}") \ && log_write "${GRAVITYFILE} is ${gravity_length} lines long." \ || log_echo "Warning: No gravity.list file found!" header_write "Analyzing pihole.log" - pihole_length=$(wc -l "${PIHOLELOG}") \ + pihole_length=$(grep -c ^ "${PIHOLELOG}") \ && log_write "${PIHOLELOG} is ${pihole_length} lines long." \ || log_echo "Warning: No pihole.log file found!"