gCubeActions/27-01-2021-grepString/grepShortLink.sh

8 lines
261 B
Bash

#!/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