i need a script that will test if proxy is working or not. Scipt should download a page with wget then grep for specific string of characters. If it can't find the string then it should send a email to specific address. I am having problems with part where it should decide if it found the string or not. export http_proxy='http://proxy.test.cz:1234/'
wget -nvq --proxy-user=test --proxy-password=test google.com &>/dev/null | grep -q '<H1>you cant't use internet</H1>' || ( echo "Proxy isnt't working" | mail -s "Proxy isnt't working!!!" -r "No-reply<firstname.lastname@example.org>" email@example.com )