MPE/iX Shell and Utilities Reference Manual, Vol 2
sh(1) MPE/iX Shell and Utilities sh(1)
Quoting can override the special meanings of reserved words and aliases. For example, in
"select" program
the quotes around select tell the shell not to interpret select as a shell reserved word.
Instead, sh does a normal command search for a command named select.
You must always quote the following characters if you want sh to interpret them literally:
|&;<>()$ ’"`\
<space> <tab> <newline>
The following characters need to be quoted in certain contexts if they are to be interpreted lit-
erally.
*?[#%=˜
Directory Substitution
When a word begins with an unquoted tilde (˜), sh tries to perform directory substitution on
the word. sh obtains all characters from the tilde (˜) to the first slash (/) and uses this as a
user name. sh looks for this name in the user database. If sh finds a matching name, it
replaces ˜name with the name of the user’s home directory, as given in the matching
/etc/passwd entry.
For example, if you specify a file name as
˜jsmith/file
sh would look up jsmith’s home directory and put that directory name in place of the
˜jsmith construct.
If you just specify a ˜ without an accompanying name, sh replaces the ˜ with the current
value of your
HOME
variable (see Variables). For example,
echo ˜
displays the name of your home directory. Similarly, sh replaces the construct tilde plus (˜+)
with the value of the
PWD
variable (the name of the your current directory), and replaces tilde
hyphen (˜–) with the value of
OLDPWD
(the name of your previous current directory). In
variable assignments, tilde expansion is also performed after colons (:).
Parameter Substitution
The shell uses three types of parameters: positional parameters, special parameters, and vari-
ables. A positional parameters is represented with either a single digit (except 0) or one or
more digits in curly braces (for example, 7 and {15} are both valid representations of posi-
tional parameters). Positional parameters are assigned values from the command line when
you invoke sh.
Commands and Utilities 1-529