From 3d5c836e9ddce17482b68df46c060db3b2f66406 Mon Sep 17 00:00:00 2001 From: Roberto Cirillo Date: Tue, 9 Mar 2021 15:23:03 +0100 Subject: [PATCH] Update '27-01-2021-grepString/grepHomeLibrary.sh' fix home-library script --- 27-01-2021-grepString/grepHomeLibrary.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/27-01-2021-grepString/grepHomeLibrary.sh b/27-01-2021-grepString/grepHomeLibrary.sh index ac7b7ee..d049196 100644 --- a/27-01-2021-grepString/grepHomeLibrary.sh +++ b/27-01-2021-grepString/grepHomeLibrary.sh @@ -1,8 +1,8 @@ #!/usr/bin/env bash -out=`find . -name pom.xml -exec grep ‘home-library’ /dev/null {} + || echo 'empty'` -if [[ ["${out}" != "empty"] && "$(grep '\.java' <<< ${out})" ]]; then +out=`find . -name '*.xml' -exec grep 'home-library' /dev/null {} + || echo 'empty'` +if [[ ["${out}" != "empty"] && "$(grep '\.xml' <<< ${out})" ]]; then echo "${out}" - echo “Home Library found" + echo "Home Library found" else - echo “Home Library not found" + echo "Home Library not found" fi \ No newline at end of file