Restricted User Shell
Rush performs word splitting using the same rules as
Statements in the configuration file refer to command line arguments
(words) by their index, using positional variables.
A positional variable can have the following forms:
where n is the variable index. The form with curly braces must be used if n is negative (see below) or greater than 9.
Arguments are numbered from ‘0’. The name of the command is argument ‘$0’. Consider, for example, the following command line:
/bin/scp -t /upload
Word splitting phase results in three positional variables being defined:
These values can also be referred to using negative indexes. They refer to words in the reverse order, as illustrated in the following table (notice the use of curly braces):
Notice also, that negative indexes are 1-based.
One final note about the ‘$0’ variable. Immediately after word
splitting it refers to both the executable program name and the 0th
argument that will be passed to that program (
of the time the two values coincide. However, the rule can modify
either value, so that they become different. Whether modified or not,
the actual name of the program to be run is kept in the request
variable ‘$program’ (see the following section).
This document was generated on July 12, 2019 using makeinfo.Verbatim copying and distribution of this entire article is permitted in any medium, provided this notice is preserved.