The jist is I want to execute a system command without worrying about shell metacharacters or quoting, and I'd also like to capture both STDOUT and STDERR.
system PROGRAM LIST is an obvious place to start. This seems to avoid the shell like I wanted, but I can't capture the output. To do that, the docs suggest I use backticks. Backticks let me get the output, but now I have to worry about shell metacharacters again. Using open also seems to rely on the shell.
So... is there a shell escape function I can use? Or is there a module to safely handle spawning and communicating with processes? Or some other standard practice? What's the way to do this?
In reply to Safe Execute System Command and Capture Output by jeffm712
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |