tiny/kill [ -g ] [ pid ... ] [ module ... ]
tiny/rm [ file ... ]
Broke kills broken processes and prints their process IDs.
Kill terminates each process (for a numeric process ID pid) or process running a given module (for a non-numeric module name), by writing a kill message to the corresponding process's control file in prog(3). The -g option causes kill to write a killgrp message instead, killing all processes in the given process's process group (see sys-pctl(2)). Processes running a module are identified by their status file, and the process ID of each such process is printed on standard output.
Rm removes files and empty directories, subject to the permission rules given in rm(1). There are no options.
Sh provides a simple user level interface (a shell) to the Inferno system. (It was once the only Inferno shell.) It reads input lines, identifies a command and arguments for that command, and arranges for execution of the corresponding Inferno module. There are features that allow input/output redirection, creating pipelines, and performing tasks in background. It is nevertheless a rudimentary shell designed for starting and debugging applications. It is not intended to serve as a general-purpose programmable shell.
If a file is named as a command line argument, that file is the source of input; otherwise, standard input is read.
Command pipelines are not allowed to span lines.
Each command pipeline consists of one or more commands separated by a vertical bar (|) character. The standard output of one command is made the standard input of the next command to the right.
Redirection of input/output to pipes takes precedence over redirection from/to files.
In the limit case, a command pipeline consists of a single command with no pipes.
A command consists of one or more fields. The first (leftmost) field is the command field. It is used to determined the executable file to be loaded and run; see below. The remaining fields are parsed and become command line arguments that are passed to the module's init function as a list of strings.
Any input following a # on a line is discarded as comment.
As a convenience, the user need not specify the .dis suffix to the filename. If missing, it will be added by the shell.
If the load fails there is, in general, a second attempt to load the module by resolving the pathname relative to the /dis directory (or any directory bound to the /dis directory in the current namespace).
There are two exceptions to this second attempt. The second load attempt is not performed if the command field provides an absolute pathname or a relative pathname starting with dot-slash (./). Such explicit naming is taken to mean that the user will accept no substitutions.
The shell requires that the Dis file implement a module with an interface equivalent to the Command module as specified in /module/sh.m (see command(2)). Otherwise, the named file will not load.
In lieu of a path mechanism, a process can create a union directory at /dis.
This expansion is not applied to the filenames used for input/output redirection.
$ echo '''' ' $ echo 'don''t' don't $ echo 'hello' 'world sh: unmatched quote $ echo 'a'b ab $ echo a'b' ab $
Attempts to redirect standard input to a non-existing file will fail. Redirecting standard output to a non-existing file will cause that file to be created. If the destination file already exists, it will be overwritten. Any previous contents are lost.
In cases of competing re-direction mechanisms (re-direct to a file and to a pipe), the pipe has precedence.
Command pipelines started by the shell are executed by threads that share the shell's name space. If those commands modify the file name space (and they have not mimicked the shell in creating their own independent name space), those modifications will be perceived by the shell when it continues execution. See bind(1) and sys-pctl(2).
|TINY(1 )||Rev: Tue Mar 31 02:42:38 GMT 2015|