![](/i/fill.gif) |
![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
So check this out: Apparently piping works on Windoze.
I knew redirecting the three standard handles works on Windoze, but I
had no idea you could actually pipe data directly from one program to
another. I thought only Unix could do that particular trick.
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Invisible wrote:
> So check this out: Apparently piping works on Windoze.
>
> I knew redirecting the three standard handles works on Windoze, but I
> had no idea you could actually pipe data directly from one program to
> another. I thought only Unix could do that particular trick.
Welcome to world of PC's. IIRC piping worked even on MS-DOS (eg. type
autoexec.bat|more).
-Aero
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Eero Ahonen wrote:
> Invisible wrote:
>> So check this out: Apparently piping works on Windoze.
>>
>> I knew redirecting the three standard handles works on Windoze, but I
>> had no idea you could actually pipe data directly from one program to
>> another. I thought only Unix could do that particular trick.
>
> Welcome to world of PC's. IIRC piping worked even on MS-DOS (eg. type
> autoexec.bat|more).
Yep. Been there since forever.
--
Inoculatte: To take coffee intravenously when you are running late.
/\ /\ /\ /
/ \/ \ u e e n / \/ a w a z
>>>>>>mue### [at] nawaz org<<<<<<
anl
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Eero Ahonen wrote:
> Welcome to world of PC's. IIRC piping worked even on MS-DOS (eg. type
> autoexec.bat|more).
Under DOS, since only one thing ran at a time, this didn't actually
"pipe" the data. It was just a shortcut for
type autoexec.bat >tempfile
more <tempfile
You had to wait for the first program to finish, and you had to have
enough disk space, before the second would start.
Pretty much every MS OS since Win3 at least has had actual pipes, tho. I
think the command.com under Win3 still used the tempfile stuff, but the
OS had a "make a pipe" call in it.
--
Darren New / San Diego, CA, USA (PST)
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Darren New <dne### [at] san rr com> wrote:
> Eero Ahonen wrote:
> > Welcome to world of PC's. IIRC piping worked even on MS-DOS (eg. type
> > autoexec.bat|more).
> Under DOS, since only one thing ran at a time, this didn't actually
> "pipe" the data. It was just a shortcut for
> type autoexec.bat >tempfile
> more <tempfile
Yes. The difference is whether a program can programmatically create
pipes or not. For example in unix systems (and probably in Windows as
well) a program can create a named pipe, after which it can write data
to it, and then another program can read the data from it. It works like
a data queue between programs. In fact, more than one program can write
to the pipe (although if two programs do so at the same time, it's not
guaranteed in which order the data will come out).
--
- Warp
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Warp wrote:
> Yes. The difference is whether a program can programmatically create
> pipes or not. For example in unix systems (and probably in Windows as
> well) a program can create a named pipe, after which it can write data
> to it, and then another program can read the data from it. It works like
> a data queue between programs. In fact, more than one program can write
> to the pipe (although if two programs do so at the same time, it's not
> guaranteed in which order the data will come out).
However Windows named pipes aren't part of the filesystem. Unix's mkfifo is
*very* useful.
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Warp wrote:
> For example in unix systems (and probably in Windows as
> well) a program can create a named pipe,
Yep. And Windows has different kinds of "pipes" as well, in addition to
the usual stream-of-bytes stuff. I'm talking about message queues and
stuff like that. Windows uses named pipes for all kinds of things, like
talking to the graphics system, over the network, etc etc.
--
Darren New / San Diego, CA, USA (PST)
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Nicolas Alvarez wrote:
> However Windows named pipes aren't part of the filesystem.
Yes they are. You just have to use \\?\.... syntax to get at them. Why
do you think they're *named* pipes?
--
Darren New / San Diego, CA, USA (PST)
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Darren New wrote:
> Yes they are. You just have to use \\?\.... syntax to get at them. Why
> do you think they're *named* pipes?
Most programs I have tried don't work with that syntax. I think it only
works if you use the Windows API directly, and not stuff like fopen...
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Nicolas Alvarez wrote:
> Most programs I have tried don't work with that syntax. I think it only
> works if you use the Windows API directly, and not stuff like fopen...
Not surprisingly, if you use the UNIX interface libraries to access
Windows juju, no, it might not work. That whole "lowest common
denominator" type thing doesn't really work anywhere once you get
sophisticated about things. :-)
But yes, I have used named pipes in Unix before, and they can be
surprisingly handy for some things. Kind of annoying in that (at least
back then) the locking/exclusion semantics made things difficult.
Difficult enough I wound up writing a socket listener instead and
replaced the I/O stuff with libraries to talk to the sockets.
--
Darren New / San Diego, CA, USA (PST)
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |