Posted By

AsTeR on 02/22/12


Tagged

Bash admin hacksmacosx


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

clacwebstudio


Website monitoring


 / Published in: Bash
 

This will curl every 10 seconds news.thesite.com and look for Awesomestring in it, if it's there, the output will play a music file through xargs. If watch is not installed on your system, install it with brew.

  1. watch -n10 "curl http://news.thesite.com | grep Awesomestring | xargs -I % /usr/bin/afplay ~/Music/my.mp3"

Report this snippet  

You need to login to post a comment.