ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matt Benson <gudnabr...@yahoo.com>
Subject Re: How to pipe output to input?
Date Fri, 24 Jun 2005 14:31:45 GMT
--- Steve Loughran <stevel@apache.org> wrote:
[SNIP]
> 
> I see. It is a lot easier to delegate to the OS,
> isnt it:
> 
> <exec executable="mkfifo" osfamily="unix">
> 	<arg file="./pipe" />
> </exec>

Well!  I am ashamed to say I had never encountered the
mkfifo command.  My only contact with "named pipes"
had been in O'Reilly's "Learning the bash shell" in
which the  >(foo) and <(bar) constructs for piping
to/from processes are covered briefly.  Named pipes
are mentioned, I assume because they are implicitly
created by this bash syntax.

I tried this:
<exec executable="mkfifo">
  <arg file="myfifo" />
</exec>
<parallel>
  <echo file="myfifo">
foo
bar
baz
etc
  </echo>
  <concat>
    <fileset file="myfifo" />
  </concat>
</parallel>
<delete file="myfifo" />

and everything works as expected on Unix.  This also
works on cygwin EXCEPT that the <delete> does not fail
in Ant yet still fails to delete the pipe.  But since
fifos would be implemented in god-only-knows-what-way
that is unsurprising.  Cool.

-Matt


		
____________________________________________________ 
Yahoo! Sports 
Rekindle the Rivalries. Sign up for Fantasy Football 
http://football.fantasysports.yahoo.com

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Mime
View raw message