routine shell
1 | language documentation Independent routines |
1.1 | (Independent routines) sub shell |
2 | class Proc |
2.1 | (Proc) method shell |
Documentation for routine shell
assembled from the following types:
language documentation Independent routines
From Independent routines
(Independent routines) sub shell
multi sub shell(, : = '-', : = '-', : = '-',Bool :, Bool : = True, Bool :,Str :, Str : = "\n", : = , :)
Runs a command through the system shell, which defaults to %*ENV<ComSpec> /c
in Windows, /bin/sh -c
otherwise. All shell metacharacters are interpreted by the shell, including pipes, redirects, environment variable substitutions and so on. Shell escapes are a severe security concern and can cause confusion with unusual file names. Use run if you want to be safe.
The return value is of type Proc.
shell 'ls -lR | gzip -9 > ls-lR.gz';
See Proc for more details, for example on how to capture output.
class Proc
From Proc
(Proc) method shell
method shell(, : = , : --> Bool)
Runs the Proc
object with the given command and environment which are passed through to the shell for parsing and execution. See shell
for an explanation of which shells are used by default in the most common operating systems.