diff --git a/27-01-2021-grepString/grepHttp.sh b/27-01-2021-grepString/grepHttp.sh index b8e35c9..019481c 100644 --- a/27-01-2021-grepString/grepHttp.sh +++ b/27-01-2021-grepString/grepHttp.sh @@ -1,3 +1,10 @@ #!/usr/bin/env bash -find . -name '*.java' -exec grep 'http://' /dev/null {} + || echo "No http found" \ No newline at end of file +if [[ "$(find . -name '*.java' -exec grep 'http://' /dev/null {} +)" ]]; then + echo "http protocol found" +else + echo " http not found" +fi + + +find . -name '*.java' -exec grep 'http://' /dev/null {} + || echo "No http found"