I have a postgreSQL database. I also have a script running that looks for a keyword on website and if the word is found the script will say word found and print out date and time when it was found.
Now the problem I am facing is how to add data from script into my database so I can see how many times the word was found and not found?
Script:
!/bin/bash
echo "looking for the word Enviro"
wget -O index.html1 https://www.overstock.com/flash-deals
echo "file updated"
if grep -q "Enviro" index.html1;
then
echo found the word Enviro > fw.tx
else
echo not found the word Enviro > nfw.txt
fi
echo "timestamp $(date)"