Mercurial > hg > Members > kono > nitros9-code
view docs/nitros9guide/shell.refentry @ 3295:6b7a7b233925 default tip
makefile: Allow PORTS with level1/2 mix
https://sourceforge.net/p/nitros9/feature-requests/10/
author | Tormod Volden <debian.tormod@gmail.com> |
---|---|
date | Tue, 19 Apr 2022 18:12:17 +0200 |
parents | bc28c3bc3769 |
children |
line wrap: on
line source
<refentry id="shell"> <refnamediv> <refname>SHELL</refname> <refpurpose>OS-9 Command Interpreter</refpurpose> </refnamediv> <refsynopsisdiv> <cmdsynopsis> <command>shell</command> <arg choice="plain"><replaceable>arglist</replaceable></arg> </cmdsynopsis> </refsynopsisdiv> <refsect1><title>Description</title> <para> The <command>shell</command> 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. </para> <para> 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. </para> <para> The rest of this description is a technical specification of the shell syntax. Use of the <command>shell</command> is described fully in Chapters 2 and 4 of this manual. </para> </refsect1> <refsect1><title>Shell Input Line Formal Syntax</title> <synopsis> <replaceable>pgm line</replaceable> := <replaceable>pgm</replaceable> {<replaceable>pgm</replaceable>} <replaceable>pgm</replaceable> := [<replaceable>params</replaceable>] [ <replaceable>name</replaceable> [<replaceable>modif</replaceable>] [<replaceable>pgm params</replaceable>] [<replaceable>modif</replaceable>] ] [<replaceable>sep</replaceable>] Program Specifications <replaceable>name</replaceable> := <replaceable>module name</replaceable> := <replaceable>pathlist</replaceable> := ( <replaceable>pgm list</replaceable> ) Parameters <replaceable>params</replaceable>:= <replaceable>param</replaceable> { <replaceable>delim</replaceable> <replaceable>param</replaceable> } <replaceable>delim</replaceable> := space or comma characters <replaceable>param</replaceable> := ex <replaceable>name</replaceable> [<replaceable>modif</replaceable>] chain to program specified := chd <replaceable>pathlist</replaceable> change working directory := kill <replaceable>procID</replaceable> send abort signal to process := setpr<replaceable>procID</replaceable> <replaceable>pty</replaceable> change process priority := chx <replaceable>pathlist</replaceable> 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 := * <replaceable>text</replaceable> comment line: not processed <replaceable>sep</replaceable> := ; sequential execution separator := & concurrent execution separator := ! pipeline separator := <replaceable>cr</replaceable> end-of-line (sequential execution separator) Modifiers <replaceable>modif</replaceable> := <replaceable>mod</replaceable> { <replaceable>delim</replaceable> <replaceable>mod</replaceable> } <replaceable>mod</replaceable> := < <replaceable>pathlist</replaceable> redirect standard input := > <replaceable>pathlist</replaceable> redirect standard output := >> <replaceable>pathlist</replaceable> redirect standard error output := # <replaceable>integer</replaceable> set process memory size in pages := # <replaceable>integer</replaceable> K set program memory size in 1K increments </synopsis> <!-- .. A new way to describe the syntax .. <productionset><title>Program Line</title> <production id="shell.line"> <lhs>pgm line</lhs> <rhs><nonterminal def="shell.pgm">pgm</nonterminal> {<nonterminal def="shell.pgm">pgm</nonterminal>} </rhs> </production> <production id="shell.pgm"> <lhs>pgm</lhs> <rhs>[<nonterminal def="shell.params">params</nonterminal>] [ <nonterminal def="shell.name">name</nonterminal> [<nonterminal def="shell.modif">modif</nonterminal>] [<nonterminal def="shell.pgmparams">pgm params</nonterminal>] [<nonterminal def="shell.modif">modif</nonterminal>] ] [<nonterminal def="shell.sep">sep</nonterminal>] </rhs> </production> </productionset> <productionset><title>Program Specifications</title> <production id="shell.name"> <lhs>name</lhs> <rhs> <nonterminal def="shell.name">module name</nonterminal> | <nonterminal def="shell.pathlist">pathlist</nonterminal> |( <nonterminal def="shell.pgmlist">pgm list</nonterminal> ) </rhs> </production> </productionset> <productionset><title>Parameters</title> <production id="shell.params"> <lhs>params</lhs> <rhs><nonterminal def="shell.param">param</nonterminal> { <nonterminal def="shell.delim">delim</nonterminal> <nonterminal def="shell.param">param</nonterminal> } </rhs> </production> <production id="shell.delim"> <lhs>delim</lhs> <rhs>space or comma characters</rhs> </production> <production id="shell.param"> <lhs>param</lhs> <rhs>ex <nonterminal def="shell.name">name</nonterminal> [<nonterminal def="shell.modif">modif</nonterminal>] <lineannotation>chain to program specified</lineannotation> <sbr/> chd <nonterminal def="shell.name">pathlist</nonterminal> <lineannotation>change working directory</lineannotation> </rhs> </production> <production id="shell.param"> <lhs>param</lhs> <rhs>space or comma characters</rhs> </production> </productionset> --> </refsect1> </refentry>