@@ -673,26 +673,27 @@
How do I redirect standard input or standard output
How do I redirect standard input or standard output
in the <code><exec></code> task?
in the <code><exec></code> task?
</p>
</p>
<p>Say you want to redirect the standard in put stream of the
<code>cat</code> command to read from a file, something
<p>Say you want to redirect the standard out put stream of the
<code>m4</code> command to write to a file, something
like:</p>
like:</p>
<pre class="code">
<pre class="code">
shell-prompt> cat &l t; foo
shell-prompt> m4 foo.m4 &g t; foo
</pre>
</pre>
<p>and try to translate it into</p>
<p>and try to translate it into</p>
<pre class="code">
<pre class="code">
<exec executable="cat">
<arg value="&lt;" />
<arg value="foo" />
<exec executable="m4">
<arg value="foo.m4"/>
<arg value="&gt;"/>
<arg value="foo"/>
</exec>
</exec>
</pre>
</pre>
<p>This will not do what you expect. The in put redirection is
<p>This will not do what you expect. The out put redirection is
performed by your shell, not the command itself, so this
performed by your shell, not the command itself, so this
should read:</p>
should read:</p>
<pre class="code">
<pre class="code">
<exec executable="/bin/sh">
<exec executable="/bin/sh">
<arg value="-c" />
<arg value="-c" />
<arg value="cat &l t; foo" />
<arg value="m4 foo.m4 &g t; foo" />
</exec>
</exec>
</pre>
</pre>
<p>Note that you must use the <code>value</code> attribute of
<p>Note that you must use the <code>value</code> attribute of
@@ -701,7 +702,7 @@ shell-prompt> cat < foo
you can use:</p>
you can use:</p>
<pre class="code">
<pre class="code">
<exec executable="/bin/sh">
<exec executable="/bin/sh">
<arg line='-c "cat &l t; foo"'/>
<arg line='-c "m4 foo.m4 &g t; foo"'/>
</exec>
</exec>
</pre>
</pre>
<p>Note the double-quotes nested inside the single-quotes.</p>
<p>Note the double-quotes nested inside the single-quotes.</p>