From 9acc3aac0176d38dc3b8a265c43a21dd7e0ebc2f Mon Sep 17 00:00:00 2001 From: Promofaux Date: Sun, 22 Jan 2017 20:44:07 +0000 Subject: [PATCH] pipe `du -h` output to awk to ensure we only get the file size, and not the filename too. Yeah that's right Dom, pipe. --- advanced/Scripts/piholeDebug.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/advanced/Scripts/piholeDebug.sh b/advanced/Scripts/piholeDebug.sh index fae667ce..08f69943 100755 --- a/advanced/Scripts/piholeDebug.sh +++ b/advanced/Scripts/piholeDebug.sh @@ -371,7 +371,7 @@ header_write "Analyzing pihole.log" && log_write "${PIHOLELOG} is ${pihole_length} lines long." \ || log_echo "Warning: No pihole.log file found!" - pihole_size=$(du -h "${PIHOLELOG}") \ + pihole_size=$(du -h "${PIHOLELOG}" | awk '{ print $1 }') \ && log_write "${PIHOLELOG} is ${pihole_length}." \ || log_echo "Warning: No pihole.log file found!"