SYSTEM

##
SYSTEM

            [SIC\]SYSTEM ["Command"]
            $ Command

        Execute a command from the operating system, or create a subshell.

        If  no  argument  is  given,  start  a subshell based on the SIC logical
        GAG\PROCESS. If it is not defined, the user $SHELL environment  variable
        is  used.  If  it is also not defined, the last fallback is /bin/sh. The
        subshell can be terminated by typing 'exit' or 'bye' or case.

        If an argument is given, execute the command in a /bin/sh subshell (note
        that  /bin/sh  is system-dependent and might behave differently from one
        system to another). It must be a single argument: use  double-quotes  to
        enclose  multiple  arguments  separated by blanks. Note that an error is
        raised if the shell command returns a non-zero status. This behavior can
        be modified in 2 manners:
        -  use dedicated command options, if any, to ensure it does not return a
          non-zero status (for example -q option for grep),
        - catch the error in the shell way, e.g. terminate the command line with
          " || true" which executes the "true" command if an error occurs. Obvi-
          ously ignoring errors is at your own risk.

        Note that Unix environment variables cannot be defined in  such  a  way,
        since it is a subshell (i.e. the environment modifications are lost when
        the subshell ends). In particular, use command SIC DIRECTORY  to  change
        your working directory.

        $ Command:
        At the interactive prompt, system commands can also be executed directly
        from the SIC level using the $ token. "Command" must be a valid  operat-
        ing  system command in the default shell of the user. The $ token is in-
        valid in procedures.