Search Unix Commands/Scripts


  Help us in improving the repository. Add new commands/scripts through 'Submit Commands/Scripts ' link.





Unix Commands/Scripts

 Sample 1. Shell Script to continuously monitor the state(up/down) of application and send email if its down

while true ; do
curl websiteaddress.com | grep -q "Down for Maintenance"
if [ $? -eq 0 ] ; then
echo "Website is Down" | mail -s "Website is down for maintenance" email@address.com
; fi
sleep 20
done

   Like      Feedback     script to monitor logs  curl  sleep  while loop  if block



Subscribe to Java News and Posts. Get latest updates and posts on Java from Buggybread.com
Enter your email address:
Delivered by FeedBurner