On Fri, Feb 13, 2009 at 12:03 PM, David <da...@abbottdavid.com> wrote:
> Hi everyone,
>
> I copied a program from C to track multiple log files. I would like to be
> able to print a label when a log file is updated. Here is the program;

Since you're calling tail itself, why not just use tail's ability to
tail multiple files? It too will output the label.

I am using tail from the GNU coreutils, version 5.97.

I did the following, using two xterms:

First, in one xterm window:
$ touch foo bar
$ tail -f foo bar

Then in another xterm:
$ echo "Hi foo" > foo
$ echo "Hi bar" > bar

Back in the first xterm window I see this:
$ tail -f foo bar
==> foo <==

==> bar <==

==> foo <==
Hi foo

==> bar <==
Hi bar
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to