GNU Rush legacy configuration syntax (split by node):   Section:   Chapter:FastBack: Rule   Up: Transformations   FastForward: Include   Contents: Table of ContentsIndex: Concept Index

3.2.1 Set

The ‘set’ transformation replaces the entire command line, or any of its arguments, with the given value.

Rule Config: set pattern

Command line is replaced with the expansion of pattern (see patterns). E.g.:

set /bin/echo "Command forbidden: ${command}"

As another example, the following rule uses set to ensure that /usr/bin/cvs binary is used:

rule cvs
  command ^cvs server
  set[0] /usr/bin/cvs
Rule Config: set[n] pattern

Replace nth argument with the expansion of pattern. Notice, that square brackets are part of the statement syntax.

See indexing, for a description of n. See patterns, for a description of pattern. E.g.:

set[0] /bin/echo