diff --git a/27-01-2021-grepString/grepShortLink.sh b/27-01-2021-grepString/grepShortLink.sh new file mode 100644 index 0000000..0572daa --- /dev/null +++ b/27-01-2021-grepString/grepShortLink.sh @@ -0,0 +1,8 @@ +#!/usr/bin/env bash +out=`find . -name '*.java' -exec grep 'http://goo.gl' /dev/null {} + || echo 'empty'` +if [[ ["${out}" != "empty"] && "$(grep '\.java' <<< ${out})" ]]; then + echo "${out}" + echo "short link found" +else + echo "short link not found" +fi \ No newline at end of file