vglob - Expand a file pattern with metacharacters in the Vesta repository


vglob [-v] [-R host[:port]] patterns...



The vglob command expands filename patterns with metacharacters in the Vesta repository. It accepts the same kinds of patterns as the vrepl command.

vglob can be an aid in developing replicator instructions and can also be used by scripts to expand filename patterns in local or remote repositories.


Turn on verbose output. When there are multiple patterns given, this makes it clear which pattern expanded to which pathnames. This is more human-readable, but less useful for scripts.

-R host[:port]
Specifies which repository to contact. This makes it possible to expand patterns in remote repositories. Defaults to the local repository.


The pattern language uses a syntax similar to Unix shell filename wildcards with some extensions.

A pathname pattern is a sequence of arcs separated by '/' characters. Metacharacters can appear within an arc, but a metacharacter cannot match a '/' except as specifically noted below. The following metacharacters are recognized.

Matches zero or more characters.

Matches zero or more decimal digits.

Matches a single character.

Matches one of the characters listed in chars. The notation b-e may be used to mean the range of ASCII characters from b through e inclusive. Most metacharacters lose their special meanings within brackets, but '/' may not appear, ']' may appear only if it is the first character in the list, '^' may appear only if it is not the first character in the list, and '-' or ',' may appear only if it is the first or last character in the list.

As above, but matches one of the characters not in chars.

Matches any one of the patterns p1 through pn. The patterns can contain arbitrary metacharacters including nested { }'s, but they cannot contain '/' characters.

Matches an arc in the current directory (as specified by the previous arcs in the pattern) that consists entirely of decimal digits, has no leading zeroes, is not bound to a ghost or stub, and has the smallest numeric value of all such arcs.

Same as FIRST, except that the arc with the largest numeric value is matched.

Matches a nonempty sequence of decimal digits whose numeric value is in the closed interval [exprLow, exprHigh]. Here exprLow and exprHigh are integer-valued expressions <expr> of the form <value> or <expr><op><value>, where <value> is either a decimal number, FIRST, or LAST, and <op> is either '+' or '-'. The tokens FIRST and LAST have the same meaning as when they appear alone. For example, "/vesta/foo/bar/[LAST-2,LAST]" would match any of the three most recent versions of the foo/bar package.

If the first character of a pattern arc is '%', the remainder of the pattern arc matches zero or more complete arcs in the repository. For example, the pattern "/vesta/%*/checkout" matches every checkout directory in the repository, no matter how many levels below the root it is. This is the only case where a metacharacter can match a string containing '/'.


As with all Vesta tools, $VESTACONFIG can be used to override the default location for the Vesta configuration file. No other environment variables are used.


The following values are obtained from the Vesta configuration file (vesta.cfg).

From the [Repository] section:

Host name of the default local repository.
TCP port number of the default local repository.

From the [UserInterface] section:

Name of the local realm. @realm is appended to local user names to obtain global user names.

See Also

vrepl(1), vesta-intro(1),


Ken Schalk <>

Most of the actual pattern matching code is common with vrepl(1), and was written by Tim Mann. Portions of this man page are copied directly from the vrepl(1) man page, also by Tim Mann.

Last modified on Mon May 12 11:27:07 EDT 2003 by         
This page was generated automatically by mtex software.