bash - Prepend message to rsstail -
i trying prepend message output of rsstail, have right now:
rsstail -o -i 15 --initial 0 http://feeds.bbci.co.uk/news/world/europe/rss.xml | awk -v time=$( date +\[%h:%m:%s_%d/%m/%y\] ) '{print time,$0}' | tee somefile.txt which should give me following:
[23:46:49_23/10/2014] title: sometitle after command have | while read line ... end never gets called because above command not output single thing. doing wrong?
ps: using python version of rsstail, since other 1 kept on crashing (https://github.com/gvalkov/rsstail.py)
edit:
as requested in comments command:
rsstail -o -i 15 --initial 0 http://feeds.bbci.co.uk/news/world/europe/rss.xml will give message next when new article found
title: sweden calls off search sub
it seems rsstail different yours, mine supports alternative
-z x add together heading 'x' so that
rsstail -z"$( date +\[%h:%m:%s_%d/%m/%y\] ) " ... does job without awk; on other hand, have problem buffering, possible inquire rsstail stop after given number of titles?
bash awk tee
No comments:
Post a Comment