Created
April 15, 2019 07:06
-
-
Save albertogalan/0b2fd5df67c8ab6c2568835293e076ba to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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