newsGNU Rush - News: Version 1.6 released.

Show feedback again
Latest News
Version 1.8 Released posted by gray, Sat 01 Oct 2016 12:17:11 PM EEST - 0 replies
Version 1.7 available posted by gray, Thu 08 Jul 2010 12:22:23 AM EEST - 0 replies
Version 1.6 released. posted by gray, Tue 10 Feb 2009 04:59:21 PM EET - 0 replies
GNU Rush version 1.5 posted by gray, Sat 17 Jan 2009 11:03:14 AM EET - 0 replies
New alpha release: Rush 1.4.90 posted by gray, Tue 13 Jan 2009 03:37:33 PM EET - 0 replies
[Submit News]
[10 news in archive]

Version 1.6 released.

Item posted by Sergey Poznyakoff <gray> on Tue 10 Feb 2009 04:59:21 PM EET.

GNU Rush version 1.6 is available for download from and

Following is a list of user-visible changes:

Patterns in transform statement

The syntax of the transform statement has been extended to
allow for specifying transformation argument string:

transform STRING REGEX
transform[N] STRING REGEX

STRING may contain meta-variables, which are expanded before
performing the transformation. The following meta-variables are

${user} User name
${group} Name of the user's principal group
${uid} UID
${gid} GID
${home} User's home directory
${gecos} User's GECOS field
${program} Program name
${command} Full command line
$0 to $9 The value of the Nth command line argument
${N} Same as above, useful if N > 9 or N < 0 (see "Negative argument indexes", below).

Thus, for example:

transform[0] s,.*/,/bin/,

is equivalent to:

transform[0] $0 s,.*/,/bin/,

The map statement

This statement sets a command line argument using a map file.


Each line in a map file FILE contains fields, separated by delimiter DELIM. The map statement looks for the record whose Kth field has the value of KEY. If such a record is found, its Vth field becomes a new value of the Nth command line argument. Othervise, if DEFAULT is given, it is used as a new value. Otherwise, the argument retains its old value.

KEY may contain meta-variables described above (see "Patterns in
transform statement").

The set statement

The set statement replaces entire command line with the new value:

rule foo
set /bin/scp -t /upload

In indexed form, it replaces the given argument:

set[0] /bin/scp

The argument to `set' may contain meta-variables (see "Patterns in transform statement").

The delete statement

This statement deletes the given argument, or range of arguments, from the command line. It has two forms:

1. Delete the Nth argument:


2. Delete all arguments between indexes N and M, inclusive:

delete N M

Modifying program name

To modify the program name (as opposed to argv[0]), use ^ pseudo-index, e.g.:

set[^] /bin/scp

By default (unless [^] form is used) argv[0] is used as the program name.

Negative argument indexes

Negative argument indexes refer to arguments numbered from the end of the command line. E.g.:

transform[-1] is the same as transform[$]
transform[-2] will transform the last but one argument

New statement interactive

This statement provides a replacement command line for interactive use of rush. By default, such use is prohibited. However, using the interactive statement you can allow some users a limited interactive access. For example:

Use of predefined error messages in exit statement

Predefined error messages can be used in `exit' statements.
E.g., the statement:

exit @nologin-message

will retrieve the text of the `nologin-message' and send it to the remote party before exiting.

If the message text must begin with a `@' sign, duplicate it:

exit @@special error message


No messages in Version 1.6 released.


Show feedback again

Back to the top

Powered by Savane 3.1-cleanup+gray