Execute a system command: Difference between revisions

m
→‎{{header|NetRexx}}: change command to ls
(Add NetRexx implementation)
m (→‎{{header|NetRexx}}: change command to ls)
Line 717:
method runSample(arg) private static
parse arg command
if command = '' then command = 'unamels -mprsvoa' -- for Windows change to: dir /s
do
say 'Executing command:' command
Line 730:
return
</lang>
{{out}}
<pre>
$ java RExecSysCmd00
Executing command: uname -mprsv
Darwin 11.4.2 Darwin Kernel Version 11.4.2: Thu Aug 23 16:25:48 PDT 2012; root:xnu-1699.32.7~1/RELEASE_X86_64 x86_64 i386
$ java RExecSysCmd00 find . -type d
Executing command: find . -type d
.
./log
./tmp
./tmp/dist
./tmp/dist/tmp
./tmp/dist/tmp/META-INF
./tmp/org
./tmp/org/rosettacode
./tmp/org/rosettacode/samples
</pre>
 
=={{header|Objective-C}}==
Anonymous user