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.

This commit is contained in:
Promofaux 2017-01-22 20:44:07 +00:00
parent 1ad23a065e
commit 9acc3aac01

View file

@ -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!"