NOSH(8)

NAME
nosh - `no-surprise' shell, a sub-standard command interpreter

SYNOPSIS
/etc/nosh [ file ]

priv nosh -gunxlp file

DESCRIPTION
Nosh executes commands read from its standard input or from the named file. It has few of the advanced features of sh(1), making it more trustable for use in security administration tasks. In the second usage, nosh is endowed with one or more of the licenses gunxlp; see labtoa(3).

  Commands
A command is either simple or builtin. Each command consists of a sequence of words separated by white space, terminated by a new-line character or end of input. Backslash quoting and sharp commenting are honored. The first word specifies the name of the command to be executed. If the command name matches one of the builtins listed below it is executed in the shell process. If the command name matches no builtin command, it is taken to be the pathname of an executable file; the name must begin with or A new process is created and an attempt is made to execute the file via exec(2) with an empty environment.

  Input-Output Redirection
The standard input is inherited by simple commands. Simple > output redirection to named files as in sh(1) works only for simple commands, and only for file descriptors 1 (default) and 2.

  Builtin Commands

cd dir
    Change the current directory to dir.
exit status
    Exit with given status, 0 by default.
set +e
set -e
    Turn an ignore-error switch on (+e, default) or off (-e). Nosh normally ignores nonzero exit status from an executed command, but exits with that status if -e is set.
set +x
set -x
    Refrain from echoing (+x, default) or echo (-x) each command as it is executed.
lmask licenses command [ arg ... ]
    Run a simple command, allowing licenses indicated by a nonempty string from the set gunxlp- to be inherited from nosh. Normally no licenses are inherited.

  Missing features
Features of sh(1) that nosh lacks include: background commands, pipelines, compound commands, most builtins, multicharacter quotation, command substitution, parameter substitution, variables, environments, file name generation, redirection of input, signal traps, search paths, mail notification, .profile, user specification of prompts.

DIAGNOSTICS
Nosh prints nonzero exit or termination status of executed commands as octal numbers labeled and see wait(2). If invoked with a file argument, it exits unconditionally for nonzero termination status or syntax error, and conditionally (under control of for nonzero exit status.
Nosh exits immediately if invoked with more than one argument, if invoked with an argument with a relative path name, if invoked by a relative path name, or if invoked with interrupt or quit signals ignored.

SEE ALSO
sh(1)