[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: redirecting --monitor output...

From: Bob Shaffer ][
Subject: Re: redirecting --monitor output...
Date: Tue, 6 May 2003 11:21:11 -0400 (EDT)

> hi, I am using --monitor and redirecting output to a perl script for
> handling:
> gnokii --monitor | perl
> Each line of output is sent to perl, as you would expect, until an
> incoming call is detected. In this case, the 8th line goes to STDOUT,
> and does not reach perl. Here is is:
> CALL0: RINGING 07971966009() (duration: 18 sec)
> As you would also expect, this is the very line I want to get to perl!
> Does anyone know how to make sure it all goes where it is needed, or
> have a different programatic method for handling incoming calls with
> --answercall and --hangup?
> bests, Tobie

Try this:

gnokii --monitor 2>&1 | perl

That will duplicate stderr on stdout.  However, you said that the line was
going to stdout instead of stderr.  If you are somehow processing the
input from stderr instead of that from stdout, you may need to reverse it,
like this:

gnokii --monitor 1>&2 | perl

....but I doubt that's what you want.  Whenever I process data from a pipe
I'm reading from the program's standard output stream.  Try the first one

        - Bob Shaffer ][ -
  - address@hidden -

reply via email to

[Prev in Thread] Current Thread [Next in Thread]