alternative find&grep syntax

This commit is contained in:
roberto cirillo 2021-02-17 10:43:58 +01:00
parent 08296aacd2
commit dddf360fb1
1 changed files with 8 additions and 0 deletions

View File

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