I am trying to pipe the output of a wget command through grep. The url is a php file with parameters. I can do it as 2 separate commands but would like to combine them so I do not have to write the file to the disk.
This code does not work (the result is always unsuccessful) -
.txt --O - http:/www.domain.com/custinv5.php?parm1=ABC&parma2=DEF
| grep -qi STRING'
This code does work -
grep -qi 'STRING' testdoc.html
if [ $? -eq 0 ]
If I remove the "sleep" from the code that it works, it fails
Any ideas would be appreciated.