diff --git a/webpage/docs/faq.html b/webpage/docs/faq.html index 4bd488b29..557315e30 100644 --- a/webpage/docs/faq.html +++ b/webpage/docs/faq.html @@ -147,6 +147,13 @@
  • How can I use Jikes specific command line switches? +
  • +
  • + How do I include a < character in my command line arguments? +
  • +
  • + How do I redirect standard input or standard output + in the <exec> task?
  • @@ -563,6 +570,119 @@ + + + + + +
    + + + How do I include a < character in my command line arguments? + + +
    +
    +

    The short answer is "Use &lt;".

    +

    The long answer is, that this probably won't do what you + want anyway, see the next + section.

    +
    +
    +
    + + + + +
    + + + How do I redirect standard input or standard output + in the <exec> task? + + +
    +
    +

    Say you want to redirect the standard input stream of the + cat command to read from a file, something + like

    +
    + + + + + + + + + + + + + + + + +
    +shell-prompt> cat < foo
    +
    +
    +

    and try to translate it into

    +
    + + + + + + + + + + + + + + + + +
    +<exec executable="cat">
    +  <arg value="&lt;" />
    +  <arg value="foo" />
    +</exec>
    +
    +
    +

    This will not do what you expect. The input-redirection is + performed by your shell, not the command itself, so this + should read:

    +
    + + + + + + + + + + + + + + + + +
    +<exec executable="/bin/sh">
    +  <arg value="-c" />
    +  <arg value="cat &lt; foo" />
    +</exec>
    +
    +
    +

    Note, that you must use the value attribute of + <arg> in the last element.

    +
    +
    diff --git a/webpage/xdocs/faq.xml b/webpage/xdocs/faq.xml index 1558cf538..b884c7158 100644 --- a/webpage/xdocs/faq.xml +++ b/webpage/xdocs/faq.xml @@ -196,6 +196,56 @@ + + + How do I include a < character in my command line arguments? + +

    The short answer is "Use &lt;".

    + +

    The long answer is, that this probably won't do what you + want anyway, see the next + section.

    +
    +
    + + + How do I redirect standard input or standard output + in the <exec> task? + +

    Say you want to redirect the standard input stream of the + cat command to read from a file, something + like

    + + cat < foo +]]> + +

    and try to translate it into

    + + + + + +]]> + +

    This will not do what you expect. The input-redirection is + performed by your shell, not the command itself, so this + should read:

    + + + + + +]]> + +

    Note, that you must use the value attribute of + <arg> in the last element.

    + +
    +
    +