GNU Rush – a restricted user shell (split by node):   Section:   Chapter:FastBack: Configuration File   Up: Configuration File   FastForward: Default Configuration   Contents: Table of ContentsIndex: Concept Index

4.1 Syntax

Configuration file consists of statements and comments.

A comment is any line whose first non-whitespace character is ‘#’. Empty lines and comments are ignored.

A statement consists of a keyword and optional argument, separated by any amount of whitespace. Depending on the keyword, the statement may treat its argument as a single value or as multiple values. For example, the command instruction takes a single value as its argument, so parsing the statement

command ^scp -t /incoming/

results in keyword ‘command’ and value ‘^scp -t /incoming/’.

If the keyword requires multiple values, its argument is split into words using the following algorithm:

  1. Any sequence of one or more non-whitespace characters is a word.
  2. Any sequence of characters enclosed in single (‘'’) or double-quotes (‘"’) is a word.
  3. Words are separated by any amount of white space.
  4. If the keyword expects s-expressions (see s-expression), these are treated as words, even if they contain white space.

Arguments, obtained as a result of rules (1) and (2) are subject to backslash interpretation, during which the following escape sequences are replaced with single characters, as described in the table below:

SequenceReplaced with
\aAudible bell character (ASCII 7)
\bBackspace character (ASCII 8)
\fForm-feed character (ASCII 12)
\nNewline character (ASCII 10)
\rCarriage return character (ASCII 13)
\tHorizontal tabulation character (ASCII 9)
\vVertical tabulation character (ASCII 11)

Table 4.1: Backslash escapes

Any escape sequence not listed in this table is replaced with its second character.

Statements are delimited by newline characters. Length of a statement line is not limited. To improve readability, long statements may be split over several lines by using backslash (‘\’) as a last character on line. Thus, the following statement:

usage-error Contact your\
 system administrator

is equivalent to:

usage-error Contact your system administrator

GNU Rush – a restricted user shell (split by node):   Section:   Chapter:FastBack: Configuration File   Up: Configuration File   FastForward: Default Configuration   Contents: Table of ContentsIndex: Concept Index