txt: ## shell.md
  shell
  
  Combined from primary sources listed below.
  
  # [In Proc](#___top "go to top of document")[§](#(Proc)_method_shell "direct link")
  
  See primary documentation
  [in context](/type/Proc#method_shell)
  for **method shell**.
  
  ```raku
  method shell($cmd, :$cwd = $*CWD, :$env --> Bool:D)
  ```
  
  Runs the `Proc` object with the given command and environment which are passed through to the shell for parsing and execution. See [`shell`](/type/independent-routines#sub_shell) for an explanation of which shells are used by default in the most common operating systems.
  
  # [In Independent routines](#___top "go to top of document")[§](#(Independent_routines)_sub_shell "direct link")
  
  See primary documentation
  [in context](/type/independent-routines#sub_shell)
  for **sub shell**.
  
  ```raku
  multi shell($cmd, :$in = '-', :$out = '-', :$err = '-',
                  Bool :$bin, Bool :$chomp = True, Bool :$merge,
                  Str :$enc, Str:D :$nl = "\n", :$cwd = $*CWD, :$env)
  
  ```
  
  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](#sub_run) if you want to be safe.
  
  The return value is of [type Proc](/type/Proc).
  
  ```raku
  shell 'ls -lR | gzip -9 > ls-lR.gz';
  ```
  
  See [`Proc`](/type/Proc#method_shell) for more details, for example on how to capture output.
  