Execute a system command
Execute a system command
You are encouraged to solve this task according to the task description, using any language you may know.
You are encouraged to solve this task according to the task description, using any language you may know.
In this task, the goal is to run either the ls
system command, or the pause
system command.
C++
Compiler: Visual C++ 2005
system("pause");
Perl
Note the use of grave quotes instead of "normal" single quotes.
`ls`
UNIX Shell
UNIX shells are designed to run system commands as a default operation.
ls
If one wants to capture the command's standard output:
CAPTUREDOUTPUT=$(ls)