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.

pull/1160/head
Promofaux 7 years ago
parent 1ad23a065e
commit 9acc3aac01

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

Loading…
Cancel
Save