FYI: <br><br>On Windows (at least with cmd.exe) piping goes to a temporary file before being fed into the second program (I believe). Since the temp file may not be on the same drive, you can wind up with mystery out-of-memory-errors on large files. I don't know if Cygwin gets around this or if the new window's shell will get around this limitation.
<br><br>Piping binary data is unreliable (at least with Python) on Windows, but that is another story.<br><br>David<br><br><div><span class="gmail_quote">On 12/1/06, <b class="gmail_sendername">Glynn Clements</b> &lt;<a href="mailto:glynn@gclements.plus.com">
glynn@gclements.plus.com</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><br>Hamish wrote:<br><br>&gt; &gt; i'm getting xyz data from the grass command prompt using a query like:
<br>&gt; &gt; echo &quot;select x,y,z from....&quot; | db.select&nbsp;&nbsp;&gt; outfile.xyz<br>&gt; &gt;<br>&gt; &gt; then reading into grass using:<br>&gt; &gt; r.in.xyz input=outfile.xyz ....<br>&gt; &gt;<br>&gt; &gt; just wondering if i can do this in one step by piping my select output
<br>&gt; &gt; directly into r.in.xyz?<br>&gt; &gt;<br>&gt; &gt; (i suppose i could just right a wrapper script to do this if i can't<br>&gt; &gt; do it directly)<br>&gt;<br>&gt; No, you can't right now. But it is a planned feature.&nbsp;&nbsp;(input=&quot;-&quot;)
<br><br>r.in.xyz may use multiple passes, and thus requires the ability to<br>rewind the input.<br><br>Allowing it to use stdin would be easy enough, but stdin would still<br>need to refer to a file (a pipe wouldn't work), so there isn't a lot
<br>of point.<br><br>--<br>Glynn Clements &lt;<a href="mailto:glynn@gclements.plus.com">glynn@gclements.plus.com</a>&gt;<br><br>_______________________________________________<br>grassuser mailing list<br><a href="mailto:grassuser@grass.itc.it">
grassuser@grass.itc.it</a><br><a href="http://grass.itc.it/mailman/listinfo/grassuser">http://grass.itc.it/mailman/listinfo/grassuser</a><br></blockquote></div><br><br clear="all"><br>-- <br>David Finlayson