Tweak grep HTTP action.

This commit is contained in:
Manuele Simi 2021-02-16 15:15:09 -05:00
parent 9a40498eed
commit 6cea4a6280
1 changed files with 7 additions and 3 deletions

View File

@ -1,4 +1,8 @@
#!/usr/bin/env bash
message="HTTP protocol found"
find . -name '*.java' -exec grep 'http://' /dev/null {} + || message="HTTP protocol not found"
echo "--- ${message} ---"
out=`find . -name '*.java' -exec grep 'http://' /dev/null {} +`
echo "${out}"
if [[ "$(grep 'java' out)" ]]; then
echo "HTTP protocol found"
else
echo "HTTP protocol not found"
fi