* [9fans] handling output
@ 2009-10-01 8:26 hugo rivera
2009-10-01 8:38 ` roger peppe
` (2 more replies)
0 siblings, 3 replies; 7+ messages in thread
From: hugo rivera @ 2009-10-01 8:26 UTC (permalink / raw)
To: Fans of the OS Plan 9 from Bell Labs
I've been wondering for a while if there's some way to multiplex (if
this is the correct term) stdout for a given program:
% ls @ {grep regexp1 > file1 } @ {grep regexp2 > file2}
where @ is an operator that would copy ls stdout to two (maybe more)
different file descriptors. Probably some syntax is required
(something like @[1=3]).
I think a c program can be written to accomplish this, but I'd like to
hear your opinion about it. Am I on the right path or just talking
rubbish?
Saludos
--
Hugo
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [9fans] handling output
2009-10-01 8:26 [9fans] handling output hugo rivera
@ 2009-10-01 8:38 ` roger peppe
2009-10-01 9:09 ` hugo rivera
2009-10-01 8:44 ` Sam Watkins
2009-10-01 8:45 ` Richard Miller
2 siblings, 1 reply; 7+ messages in thread
From: roger peppe @ 2009-10-01 8:38 UTC (permalink / raw)
To: Fans of the OS Plan 9 from Bell Labs
2009/10/1 hugo rivera <uair00@gmail.com>:
> I've been wondering for a while if there's some way to multiplex (if
> this is the correct term) stdout for a given program:
that's what tee does.
e.g.
ls | tee >{grep regexp1 > file1} >{grep regexp2 > file2}
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [9fans] handling output
2009-10-01 8:26 [9fans] handling output hugo rivera
2009-10-01 8:38 ` roger peppe
@ 2009-10-01 8:44 ` Sam Watkins
2009-10-01 8:45 ` Richard Miller
2 siblings, 0 replies; 7+ messages in thread
From: Sam Watkins @ 2009-10-01 8:44 UTC (permalink / raw)
To: Fans of the OS Plan 9 from Bell Labs
I'd like to make a "graphical shell" which could do this sort of thing, it
would also have a textual format for saving and suitable for editing.
I think it would be good to have an equivalent graphical tool for each command
line tool, as powerful as the original one; and an editable graphical
representation of each file format, file-based interface or protocol.
A nodes-and-arcs graph representation is already parsed and more symmetric that
a textual language.
Sam
On Thu, Oct 01, 2009 at 10:26:06AM +0200, hugo rivera wrote:
> I've been wondering for a while if there's some way to multiplex (if
> this is the correct term) stdout for a given program:
> % ls @ {grep regexp1 > file1 } @ {grep regexp2 > file2}
> where @ is an operator that would copy ls stdout to two (maybe more)
> different file descriptors.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [9fans] handling output
2009-10-01 8:26 [9fans] handling output hugo rivera
2009-10-01 8:38 ` roger peppe
2009-10-01 8:44 ` Sam Watkins
@ 2009-10-01 8:45 ` Richard Miller
2 siblings, 0 replies; 7+ messages in thread
From: Richard Miller @ 2009-10-01 8:45 UTC (permalink / raw)
To: 9fans
> I've been wondering for a while if there's some way to multiplex (if
> this is the correct term) stdout for a given program:
> % ls @ {grep regexp1 > file1 } @ {grep regexp2 > file2}
ls | tee >{grep regexp1 >file1} | grep regexp2 >file2
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [9fans] handling output
2009-10-01 8:38 ` roger peppe
@ 2009-10-01 9:09 ` hugo rivera
2009-10-01 9:29 ` matt
0 siblings, 1 reply; 7+ messages in thread
From: hugo rivera @ 2009-10-01 9:09 UTC (permalink / raw)
To: Fans of the OS Plan 9 from Bell Labs
Great, thanks.
Looks like plan 9 guys have thought about everything useful ☺ (and
that I didn't do my homework).
2009/10/1, roger peppe <rogpeppe@gmail.com>:
> 2009/10/1 hugo rivera <uair00@gmail.com>:
>
> > I've been wondering for a while if there's some way to multiplex (if
> > this is the correct term) stdout for a given program:
>
>
> that's what tee does.
>
> e.g.
> ls | tee >{grep regexp1 > file1} >{grep regexp2 > file2}
>
>
--
Hugo
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [9fans] handling output
2009-10-01 9:09 ` hugo rivera
@ 2009-10-01 9:29 ` matt
2009-10-01 9:52 ` hugo rivera
0 siblings, 1 reply; 7+ messages in thread
From: matt @ 2009-10-01 9:29 UTC (permalink / raw)
To: Fans of the OS Plan 9 from Bell Labs
Tee part of the POSIX standard
http://www.opengroup.org/onlinepubs/9699919799/utilities/tee.html
hugo rivera wrote:
>Great, thanks.
>Looks like plan 9 guys have thought about everything useful ☺ (and
>that I didn't do my homework).
>
>2009/10/1, roger peppe <rogpeppe@gmail.com>:
>
>
>>2009/10/1 hugo rivera <uair00@gmail.com>:
>>
>>
>>
>>>I've been wondering for a while if there's some way to multiplex (if
>>>
>>>
>> > this is the correct term) stdout for a given program:
>>
>>
>>that's what tee does.
>>
>> e.g.
>> ls | tee >{grep regexp1 > file1} >{grep regexp2 > file2}
>>
>>
>>
>>
>
>
>
>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [9fans] handling output
2009-10-01 9:29 ` matt
@ 2009-10-01 9:52 ` hugo rivera
0 siblings, 0 replies; 7+ messages in thread
From: hugo rivera @ 2009-10-01 9:52 UTC (permalink / raw)
To: Fans of the OS Plan 9 from Bell Labs
shame on me, I didn't know about it.
2009/10/1, matt <maht-9fans@maht0x0r.net>:
> Tee part of the POSIX standard
>
> http://www.opengroup.org/onlinepubs/9699919799/utilities/tee.html
>
>
>
> hugo rivera wrote:
>
>
> > Great, thanks.
> > Looks like plan 9 guys have thought about everything useful ☺ (and
> > that I didn't do my homework).
> >
> > 2009/10/1, roger peppe <rogpeppe@gmail.com>:
> >
> >
> > > 2009/10/1 hugo rivera <uair00@gmail.com>:
> > >
> > >
> > >
> > > > I've been wondering for a while if there's some way to multiplex (if
> > > >
> > > >
> > > > this is the correct term) stdout for a given program:
> > >
> > >
> > > that's what tee does.
> > >
> > > e.g.
> > > ls | tee >{grep regexp1 > file1} >{grep regexp2 > file2}
> > >
> > >
> > >
> > >
> >
> >
> >
> >
>
>
>
--
Hugo
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2009-10-01 9:52 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-10-01 8:26 [9fans] handling output hugo rivera
2009-10-01 8:38 ` roger peppe
2009-10-01 9:09 ` hugo rivera
2009-10-01 9:29 ` matt
2009-10-01 9:52 ` hugo rivera
2009-10-01 8:44 ` Sam Watkins
2009-10-01 8:45 ` Richard Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).