From: Seebs on
On 2010-04-22, Jon LaBadie <jlabadie(a)aXcXm.org> wrote:
> As this is running in a "terminal", why not use /dev/tty?

Because the question asked was how to tee to stderr, I thought?
Anyway, /dev/tty is obviously better if you want the terminal
regardless of where stderr is going...

-s
--
Copyright 2010, all wrongs reversed. Peter Seebach / usenet-nospam(a)seebs.net
http://www.seebs.net/log/ <-- lawsuits, religion, and funny pictures
http://en.wikipedia.org/wiki/Fair_Game_(Scientology) <-- get educated!
From: PDreyer on
On Apr 20, 10:16 pm, Tobiah <t...(a)rcsreg.com> wrote:
> Sometimes I use the 'tee' command so that I
> can see output while it's being generated,
> but still saving it to a file.  
>
> It would be nice if I could see the output,
> but still redirect the output to a pipe:
>
> data_maker | tee --use_stderr | data_taker
>
> If tee had a flag like that, I could see the
> data on stderr, while still piping it to
> the receiving process.
>
> Is there some other way to do this?
>
> Thanks,
>
> Tobiah

data_maker | tee >(cat - >&2) | data_taker
From: Tobiah on
>> If tee had a flag like that, I could see the data on stderr, while
>> still piping it to the receiving process.
>>
>> Is there some other way to do this?
>
> ... | tee /dev/fd/2 | ...

That's pretty neat. How portable is that?

Thanks,

Toby
From: Seebs on
On 2010-04-21, Tobiah <toby(a)rcsreg.com> wrote:
>>> If tee had a flag like that, I could see the data on stderr, while
>>> still piping it to the receiving process.

>>> Is there some other way to do this?

>> ... | tee /dev/fd/2 | ...

> That's pretty neat. How portable is that?

On modern systems, "pretty portable". I think I've seen /dev/stderr
as far back as 10-20 years ago.

-s
--
Copyright 2010, all wrongs reversed. Peter Seebach / usenet-nospam(a)seebs.net
http://www.seebs.net/log/ <-- lawsuits, religion, and funny pictures
http://en.wikipedia.org/wiki/Fair_Game_(Scientology) <-- get educated!
From: Eric on
On 2010-04-21, Seebs <usenet-nospam(a)seebs.net> wrote:
> On 2010-04-21, Tobiah <toby(a)rcsreg.com> wrote:
>>>> If tee had a flag like that, I could see the data on stderr, while
>>>> still piping it to the receiving process.
>
>>>> Is there some other way to do this?
>
>>> ... | tee /dev/fd/2 | ...
>
>> That's pretty neat. How portable is that?
>
> On modern systems, "pretty portable". I think I've seen /dev/stderr
> as far back as 10-20 years ago.
>
> -s

Not totally relevant, I know, but somewhere in the back of my brain is a
memory of some rather odd "pipe fitting" utility progams that were, I
think, part of some statistical package. The only name I remember is
"yoo" which somehow allowed a U-bend join between two non-adjacent parts
of a pipeline. Anyone out there got a slightly better memory, or even
some real information?

Thx,

E