added if statement to grepHttp script

This commit is contained in:
Roberto Cirillo 2021-02-16 11:19:19 +01:00
parent 8d6921d192
commit 74061c222d
1 changed files with 8 additions and 1 deletions

View File

@ -1,3 +1,10 @@
#!/usr/bin/env bash
find . -name '*.java' -exec grep 'http://' /dev/null {} + || echo "No http found"
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"