switch out wc -l
with grep -c ^
This commit is contained in:
@ -361,13 +361,13 @@ files_check "${ADLISTFILE}"
|
|||||||
|
|
||||||
header_write "Analyzing gravity.list"
|
header_write "Analyzing gravity.list"
|
||||||
|
|
||||||
gravity_length=$(wc -l "${GRAVITYFILE}") \
|
gravity_length=$(grep -c ^ "${GRAVITYFILE}") \
|
||||||
&& log_write "${GRAVITYFILE} is ${gravity_length} lines long." \
|
&& log_write "${GRAVITYFILE} is ${gravity_length} lines long." \
|
||||||
|| log_echo "Warning: No gravity.list file found!"
|
|| log_echo "Warning: No gravity.list file found!"
|
||||||
|
|
||||||
header_write "Analyzing pihole.log"
|
header_write "Analyzing pihole.log"
|
||||||
|
|
||||||
pihole_length=$(wc -l "${PIHOLELOG}") \
|
pihole_length=$(grep -c ^ "${PIHOLELOG}") \
|
||||||
&& log_write "${PIHOLELOG} is ${pihole_length} lines long." \
|
&& log_write "${PIHOLELOG} is ${pihole_length} lines long." \
|
||||||
|| log_echo "Warning: No pihole.log file found!"
|
|| log_echo "Warning: No pihole.log file found!"
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user