With the following:
curl URL | grep -i "KEYWORD" && "keyword found" || echo "keyword not found" >> result.txt
How can I get the results into the file? Seems this does not work with or without the file created.
Objective:
Search for keyword in curl result, if found append to file 'found' else append 'not found'.
Edit:
I figured it out:
curl URL | grep -i "keyword" && echo "found $(date)" >> result || echo "not found $(date)" >> result