From e3df11cc0a969652c9b14c117a62e86c22f8a0ce Mon Sep 17 00:00:00 2001
From: Stefan Bodewig <exec>
task?
Say you want to redirect the standard input stream of the
- cat
command to read from a file, something
+
Say you want to redirect the standard output stream of the
+ m4
command to write to a file, something
like:
-shell-prompt> cat < foo +shell-prompt> m4 foo.m4 > foo
and try to translate it into
-<exec executable="cat"> - <arg value="<" /> - <arg value="foo" /> +<exec executable="m4"> + <arg value="foo.m4"/> + <arg value=">"/> + <arg value="foo"/> </exec>-
This will not do what you expect. The input redirection is +
This will not do what you expect. The output redirection is performed by your shell, not the command itself, so this should read:
<exec executable="/bin/sh"> <arg value="-c" /> - <arg value="cat < foo" /> + <arg value="m4 foo.m4 > foo" /> </exec>
Note that you must use the value
attribute of
@@ -701,7 +702,7 @@ shell-prompt> cat < foo
you can use:
<exec executable="/bin/sh"> - <arg line='-c "cat < foo"'/> + <arg line='-c "m4 foo.m4 > foo"'/> </exec>
Note the double-quotes nested inside the single-quotes.
diff --git a/xdocs/faq.xml b/xdocs/faq.xml index 71d950fb5..bc15465f9 100644 --- a/xdocs/faq.xml +++ b/xdocs/faq.xml @@ -313,31 +313,32 @@<exec>
task?Say you want to redirect the standard input stream of the
- cat
command to read from a file, something
+
Say you want to redirect the standard output stream of the
+ m4
command to write to a file, something
like:
and try to translate it into
This will not do what you expect. The input redirection is +
This will not do what you expect. The output redirection is performed by your shell, not the command itself, so this should read: