Skip to content

Instantly share code, notes, and snippets.

@albertogalan
Created April 15, 2019 07:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save albertogalan/0b2fd5df67c8ab6c2568835293e076ba to your computer and use it in GitHub Desktop.
Save albertogalan/0b2fd5df67c8ab6c2568835293e076ba to your computer and use it in GitHub Desktop.
#!/bin/bash
if [[ $# -eq 0 ]]; then
echo "$red This command $reset"
echo "Usage: ${FUNCNAME[0]} $green {word} $reset"
exit 0
fi
word="$1"
MINCHAR=3
LOG=/data/databases/raw/lists/searchedtest.txt
while read f; do
#statements
if [ ${#f} -gt $MINCHAR ]; then
# exact coincidence with rx
if grep -rx "$f" $LOG ; then
echo already processed $f
else
if [ ${#f} -gt $MINCHAR ]; then
firefox "https://www.google.com/search?client=ubuntu&channel=fs&q=site%3Alinkedin.com+$f&ie=utf-8&oe=utf-8"
read aaa </dev/tty
echo "$f" >> $LOG
fi
fi
fi
done < $1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment