diff --git a/27-01-2021-grepString/grepHttp.sh b/27-01-2021-grepString/grepHttp.sh index 318a2d8..182c343 100644 --- a/27-01-2021-grepString/grepHttp.sh +++ b/27-01-2021-grepString/grepHttp.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash out=`find . -name '*.java' -exec grep 'http://' /dev/null {} +` echo "${out}" -if [[ "$(grep 'java' ${out})" ]]; then +if [[ "$(grep '\.java' <<< ${out})" ]]; then echo "HTTP protocol found" else echo "HTTP protocol not found"