|
|
@@ -147,6 +147,13 @@ |
|
|
|
<li><a href="#jikes-switches"> |
|
|
|
How can I use Jikes specific command line |
|
|
|
switches? |
|
|
|
</a></li> |
|
|
|
<li><a href="#shell-redirect-1"> |
|
|
|
How do I include a < character in my command line arguments? |
|
|
|
</a></li> |
|
|
|
<li><a href="#shell-redirect-2"> |
|
|
|
How do I redirect standard input or standard output |
|
|
|
in the <code><exec></code> task? |
|
|
|
</a></li> |
|
|
|
</ul> |
|
|
|
</blockquote> |
|
|
@@ -563,6 +570,119 @@ |
|
|
|
</blockquote> |
|
|
|
</td></tr> |
|
|
|
</table> |
|
|
|
</a> |
|
|
|
<a name="shell-redirect-1"> |
|
|
|
<table border="0" cellspacing="0" cellpadding="2" width="100%"> |
|
|
|
<tr><td bgcolor="#828DA6"> |
|
|
|
<font color="#ffffff" face="arial,helvetica,sanserif"> |
|
|
|
<strong> |
|
|
|
How do I include a < character in my command line arguments? |
|
|
|
</strong> |
|
|
|
</font> |
|
|
|
</td></tr> |
|
|
|
<tr><td> |
|
|
|
<blockquote> |
|
|
|
<p>The short answer is "Use <code>&lt;</code>".</p> |
|
|
|
<p>The long answer is, that this probably won't do what you |
|
|
|
want anyway, see <a href="#shell-redirect-2">the next |
|
|
|
section</a>.</p> |
|
|
|
</blockquote> |
|
|
|
</td></tr> |
|
|
|
</table> |
|
|
|
</a> |
|
|
|
<a name="shell-redirect-2"> |
|
|
|
<table border="0" cellspacing="0" cellpadding="2" width="100%"> |
|
|
|
<tr><td bgcolor="#828DA6"> |
|
|
|
<font color="#ffffff" face="arial,helvetica,sanserif"> |
|
|
|
<strong> |
|
|
|
How do I redirect standard input or standard output |
|
|
|
in the <code><exec></code> task? |
|
|
|
</strong> |
|
|
|
</font> |
|
|
|
</td></tr> |
|
|
|
<tr><td> |
|
|
|
<blockquote> |
|
|
|
<p>Say you want to redirect the standard input stream of the |
|
|
|
<code>cat</code> command to read from a file, something |
|
|
|
like</p> |
|
|
|
<div align="left"> |
|
|
|
<table cellspacing="4" cellpadding="0" border="0"> |
|
|
|
<tr> |
|
|
|
<td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> |
|
|
|
<td bgcolor="#023264" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> |
|
|
|
<td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> |
|
|
|
</tr> |
|
|
|
<tr> |
|
|
|
<td bgcolor="#023264" width="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> |
|
|
|
<td bgcolor="#ffffff"><pre> |
|
|
|
shell-prompt> cat < foo |
|
|
|
</pre></td> |
|
|
|
<td bgcolor="#023264" width="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> |
|
|
|
</tr> |
|
|
|
<tr> |
|
|
|
<td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> |
|
|
|
<td bgcolor="#023264" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> |
|
|
|
<td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> |
|
|
|
</tr> |
|
|
|
</table> |
|
|
|
</div> |
|
|
|
<p>and try to translate it into</p> |
|
|
|
<div align="left"> |
|
|
|
<table cellspacing="4" cellpadding="0" border="0"> |
|
|
|
<tr> |
|
|
|
<td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> |
|
|
|
<td bgcolor="#023264" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> |
|
|
|
<td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> |
|
|
|
</tr> |
|
|
|
<tr> |
|
|
|
<td bgcolor="#023264" width="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> |
|
|
|
<td bgcolor="#ffffff"><pre> |
|
|
|
<exec executable="cat"> |
|
|
|
<arg value="&lt;" /> |
|
|
|
<arg value="foo" /> |
|
|
|
</exec> |
|
|
|
</pre></td> |
|
|
|
<td bgcolor="#023264" width="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> |
|
|
|
</tr> |
|
|
|
<tr> |
|
|
|
<td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> |
|
|
|
<td bgcolor="#023264" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> |
|
|
|
<td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> |
|
|
|
</tr> |
|
|
|
</table> |
|
|
|
</div> |
|
|
|
<p>This will not do what you expect. The input-redirection is |
|
|
|
performed by your shell, not the command itself, so this |
|
|
|
should read:</p> |
|
|
|
<div align="left"> |
|
|
|
<table cellspacing="4" cellpadding="0" border="0"> |
|
|
|
<tr> |
|
|
|
<td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> |
|
|
|
<td bgcolor="#023264" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> |
|
|
|
<td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> |
|
|
|
</tr> |
|
|
|
<tr> |
|
|
|
<td bgcolor="#023264" width="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> |
|
|
|
<td bgcolor="#ffffff"><pre> |
|
|
|
<exec executable="/bin/sh"> |
|
|
|
<arg value="-c" /> |
|
|
|
<arg value="cat &lt; foo" /> |
|
|
|
</exec> |
|
|
|
</pre></td> |
|
|
|
<td bgcolor="#023264" width="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> |
|
|
|
</tr> |
|
|
|
<tr> |
|
|
|
<td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> |
|
|
|
<td bgcolor="#023264" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> |
|
|
|
<td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td> |
|
|
|
</tr> |
|
|
|
</table> |
|
|
|
</div> |
|
|
|
<p>Note, that you must use the <code>value</code> attribute of |
|
|
|
<code><arg></code> in the last element.</p> |
|
|
|
</blockquote> |
|
|
|
</td></tr> |
|
|
|
</table> |
|
|
|
</a> |
|
|
|
<a name="integration"> |
|
|
|
<table border="0" cellspacing="0" cellpadding="2" width="100%"> |
|
|
|