sh — Start a new ABLE shell


sh [-x] [-e] [-v] [-i] [--help] [--version]



Display the command to be executed with its variables expanded.


Exit immediately if a command fails


Display lines of input as they are read.


Start an interactive shell


Display short helptext and exit


Display commands version and exit


This command starts a new ABLE shell, for full information on using the shell refer to Chapter 3, Command Line Interface. The newly created shell environment is separate from the invoking shell, variables from the parent are not available and upon exit any variables set within the shell are lost.

Example 10.3. Subshell variable scope

This example shows setting variables in the outer shell and in the subshell and their scope.

>echo ${FOO}

>echo ${BAR}

>FOO="hello and goodbye"
>BAR="goodbye and hello"
>echo ${FOO}

>echo ${BAR}

>BAR="something else"
>echo ${FOO} ${BAR}
something else entirely
>echo ${FOO}
hello and goodbye
>echo ${BAR}
goodbye and hello

The -x, -e and -v switches control the shells overall behaviour, these variables are accessed from the shell using the special variable $_.