From bcf8139708c529db7c2b76e88af7e5bcf1b4b42e Mon Sep 17 00:00:00 2001 From: DL6ER Date: Thu, 22 Dec 2016 18:55:14 +0100 Subject: [PATCH] Removed cat where we don't need it --- advanced/Scripts/chronometer.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/advanced/Scripts/chronometer.sh b/advanced/Scripts/chronometer.sh index a2482d0d..702ed1c9 100755 --- a/advanced/Scripts/chronometer.sh +++ b/advanced/Scripts/chronometer.sh @@ -33,7 +33,7 @@ CalcBlockedDomains() { CalcQueriesToday() { if [ -e "${piLog}" ]; then - queriesToday=$(cat "${piLog}" | awk '/query/ {print $6}' | wc -l) + queriesToday=$(awk '/query/ {print $6}' < "${piLog}" | wc -l) else queriesToday="Err." fi @@ -41,7 +41,7 @@ CalcQueriesToday() { CalcblockedToday() { if [ -e "${piLog}" ] && [ -e "${gravity}" ];then - blockedToday=$(cat ${piLog} | awk '/\/etc\/pihole\/gravity.list/ && !/address/ {print $6}' | wc -l) + blockedToday=$(awk '/\/etc\/pihole\/gravity.list/ && !/address/ {print $6}' < "${piLog}" | wc -l) else blockedToday="Err." fi