Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I need to watch a RSS feed from our hudson ci server. Each time a new entry is available i want to play a sound by calling #>play sound.wav.

Does anyone know a tool which can watch a rss-feed and fire a command each time a new entry appears?

I had a look at rsstail but it gets all entries from the feed and not the latest or only the ones that are new since the last lookup.

share|improve this question
Maybe you can modify bashpodder.shell? (lincgeek.org/bashpodder) – Johan Oct 6 '11 at 7:18
Are you sure you are using rsstail correctly? Its manpage says thet the default interval of checking for new feeds is 15 minutes and it can be changed by the -i parameter. (Remember that by RSS design, you'll never get the update information instantly, you have to poll.) – rozcietrzewiacz Oct 6 '11 at 9:18
hell yeah. rsstail -i 3 -u example.com/rss.xml -n 0 thats it. Thanks alot! – martin Oct 7 '11 at 11:37

You can try using Newsbeuter which has an option to run an external command (see notify-program in the documentation).

Canto also has some customizable hooks, though the whole configuration system looks a bit more complicated at first glance.

With rsstail + shell you can also invoke external commands. Start off with what you already figured out:

rsstail -i 3 -u example.com/rss.xml -n 0

and pipe the output to a while read loop:

rsstail -i 3 -u example.com/rss.xml -n 0 | while read line
    aplay /some/sound/file.wav
    echo "$line"
share|improve this answer
up vote 2 down vote accepted

Thats the solution:

rsstail -i 3 -u example.com/rss.xml -n 0 | while read x ; do play fail.ogg ; done

so each time a new topic is released in the feed, the sound will be played. play is packaged in sox

share|improve this answer
I understand that this solves the part about refreshing, but is not (yet) a way to play sound (the main part you asked for). If you solved it as well, please write how. – rozcietrzewiacz Oct 7 '11 at 12:26
your right. just updating ... – martin Oct 12 '11 at 10:45

You could try:

while true
    now="$(curl http://yourdomain/feed.rss 2> /dev/null | grep pubDate | head -1)"
    test "$last" != "$now" && play mysound.wav
    sleep 1m
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.