From d5600373eba8a67184afe4809f0a35819af69e68 Mon Sep 17 00:00:00 2001 From: Roberto Cirillo Date: Tue, 16 Mar 2021 12:10:14 +0100 Subject: [PATCH] Add '27-01-2021-grepString/grepShortLink.sh' add new script in order to retrieve google short links --- 27-01-2021-grepString/grepShortLink.sh | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 27-01-2021-grepString/grepShortLink.sh 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