Simplify the command in grepHTTTP and print the files where the string is found.

This commit is contained in:
Manuele Simi 2021-02-12 14:50:22 -05:00
parent 564436828e
commit 5afc9efc0e
1 changed files with 2 additions and 5 deletions

View File

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