From 77135ca3c74a6aca0265b0696aadd73f01b051ad Mon Sep 17 00:00:00 2001 From: Adam Warner Date: Fri, 26 Aug 2016 10:09:39 +0100 Subject: [PATCH] Actually pass through the argument to the function --- pihole | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pihole b/pihole index 0b67d6c0..7d0f4c18 100755 --- a/pihole +++ b/pihole @@ -63,7 +63,8 @@ function setupLCDFunction { } function queryFunc { - for list in /etc/pihole/list.*;do echo $list;grep '$@' $list;done + domain=$2 + for list in /etc/pihole/list.*;do echo $list;grep ${domain} $list;done exit 1 } @@ -122,7 +123,7 @@ case "$1" in "-c" | "chronometer" ) chronometerFunc "$@";; "-h" | "help" ) helpFunc;; "-v" | "version" ) versionFunc;; -"-q" | "query" ) queryFunc;; +"-q" | "query" ) queryFunc "$@";; "uninstall" ) uninstallFunc;; * ) helpFunc;; esac