Just piping the output through sed
should do the job.
rsstail -l -n 4 -u https://news.ycombinator.com/rss | sed -n 's/^Link: //p'
Translation: Do not print anything by default (-n). On all lines that begin with "Link: ", delete those characters and print what remains.
But, there is still a question of how rapidly you want to see the output. When rsstail
sees that its stdout is not a terminal, it will likely switch from line-buffered to block-buffered output and wait until it has a full 4K block to write. sed
will do the same thing. Some programs have an option to force line-buffering or non-buffering (e.g., the "--line-buffered" option in grep
, or the "-u" (--unbuffered) option in sed
). If you need the output to appear immediately, you might check whether rsstail
has an option like that. Lacking that, there are programs like unbuffer
that will present a pseudo-tty device that you can use as the target of the pipe.
If your output is going to a file, you probably don't need to worry about any of that, but if you are testing with output going to a terminal, you need to be aware of the buffering involved.
is typically distributed as part of the expect