in reply to Re^3: system command has problem with '>>'
in thread system command has problem with '>>'
it process >> like the shell without invoking the shell
No.
$ dir foo ls: foo: No such file or directory $ perl -MIPC::System::Simple=systemx -e'systemx "ls", ">>", "foo"' ls: >>: No such file or directory ls: foo: No such file or directory "ls" unexpectedly returned exit value 2 at -e line 1 $ perl -MIPC::System::Simple=systemx -e'systemx "ls >> foo"' "ls >> foo" failed to start: "No such file or directory" at -e line 1 $ dir foo ls: foo: No such file or directory
Same goes for 2>&1
$ perl -MIPC::System::Simple=systemx -e'systemx "ls 2>&1"' "ls 2>&1" failed to start: "No such file or directory" at -e line 1 $ perl -MIPC::System::Simple=systemx -e'systemx "ls", "2>&1"' ls: 2>&1: No such file or directory "ls" unexpectedly returned exit value 2 at -e line 1
It would defy the entire point of systemx if any argument was treated specially.
|
|---|