## Name

SHELL — OS-9 Command Interpreter

## Synopsis

`shell` `arglist`

## Description

The shell is OS-9's command interpreter program. It reads data from its standard input path (the keyboard or a file), and interprets the data as a sequence of commands. - The basic function of the shell is to initiate and control execution of other OS-9 programs.

The shell reads and interprets one text line at a time from the standard input path. After interpretation of each line it reads another until an end-of-file condition occurs, at which time it terminates itself. A special case is when the shell is called from another program, in which case it will take the parameter area (rest of the command line) as its first line of input. If this command line consists of “built in” commands only, more lines will be read and processed; otherwise control will return to the calling program after the single command line is processed.

The rest of this description is a technical specification of the shell syntax. Use of the shell is described fully in Chapters 2 and 4 of this manual.

## Shell Input Line Formal Syntax

    pgm line := pgm {pgm}
    pgm := [params] [ name [modif] [pgm params] [modif] ] [sep]

    Program Specifications

    name := module name
               := pathlist
               := ( pgm list )

    Parameters

    params:= param { delim param }
    delim := space or comma characters
    param := ex name [modif] chain to program specified
             := chd pathlist    change working directory
             := kill procID     send abort signal to process
             := setpr procID pty change process priority
             := chx pathlist    change execution directory
             := w               wait for any process to die
             := p               turn “OS9:” prompting on
             := -p              turn prompting off
             := t               echo input lines to std output
             := -t              don't echo input lines
             := -x              dont abort on error
             := x               abort on error
             := * text          comment line: not processed
    sep   := ;     sequential execution separator
             := &     concurrent execution separator
             := !     pipeline separator
             := cr end-of-line (sequential execution separator)

    Modifiers

    modif := mod { delim mod }
    mod   := < pathlist redirect standard input
            := > pathlist redirect standard output
            := >> pathlist redirect standard error output
            := # integer set process memory size in pages
            := # integer K   set program memory size in 1K increments