Skip to documentation
DocumentationAll documentsEnglish

MATCH(nged)

NAME

match - list database objects whose names match a wildcard expression

On this page

SYNOPSIS

match expression [expression ...]

DESCRIPTION

The match command lists all database objects whose names match one or more wildcard expression patterns. Each expression is matched independently against all object names in the database using standard path-matching wildcard rules (as used by bu_path_match):

  • * — matches any sequence of characters (including none)

  • ? — matches any single character

  • […​] — matches any character in the set

The names of all matching objects are printed. If multiple expressions are given, the union of all matches is returned.

EXAMPLES

Example 1. List all objects starting with "hull"

mged> match hull*

Lists all objects whose names begin with hull, for example: hull.r, hull.s, hull_backup.r.

Example 2. Match by suffix

mged> match *.r

Lists all objects whose names end in .r (typically regions).

Example 3. Multiple patterns

mged> match hull* turret*

Lists all objects matching either hull* or turret*.

SEE ALSO

ls(nged), search(nged)

AUTHOR

BRL-CAD Team

BUG REPORTS

Reports of bugs or problems should be submitted via electronic mail to devs@brlcad.org