From eb687642db67caf1ae9658f3cc2ab31582f0e2a2 Mon Sep 17 00:00:00 2001 From: William Harrington Date: Mon, 5 Apr 2021 21:02:08 -0500 Subject: Have grep exit 0 without stdoutput when checking if a package is in packages.csv. --- packageinstall.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'packageinstall.sh') diff --git a/packageinstall.sh b/packageinstall.sh index c9689a6..48d93e4 100644 --- a/packageinstall.sh +++ b/packageinstall.sh @@ -3,7 +3,7 @@ CHAPTER="$1" PACKAGE="$2" -if ! grep "^${PACKAGE}" packages.csv; then +if ! grep "^${PACKAGE}" packages.csv >/dev/null 2>&1; then printf "%b" " ${IRED}PACKAGE ${IYLW}${PACKAGE} ${IRED}DOES NOT EXIST!${RST}\n" exit 1 fi -- cgit v1.2.3-54-g00ecf