PRIMITIVES:

-attr attrib[>/</=val]

Returns TRUE if the object has attribute attrib. If a specific value is also supplied for the attribute with an equal condition, TRUE is returned if the object both has the attribute and the attribute is set to value val. In the case of >, <, >=, and <= there are two possibilities - if val is numerical a numerical comparison is performed, otherwise a string comparison is performed. Both attrib and val are treated as patterns under shell pattern matching rules when a string comparison is performed, but in numerical mode only the attribute name is pattern matched.

-bool u/+/-

True if the object in question is being combined into the local hierarchy with the specified boolean operation. Recognized types are Union (u), Intersection (+), and Subtraction (-).

Note that by convention, top level objects are implicitly "unioned" into the database. To see only objects that have been unioned into a comb tree without returning the top level comb object as well, use the -mindepth option to filter for returns deeper in the tree.

-iname pattern

Like name except the match is case insensitive.

-iregex pattern

Like regex except the match is case insensitive.

-maxdepth n

True if the depth of the object in the tree is less than or equal to n.

-mindepth n

True if the depth of the object in the tree is greater than or equal to n.

-name pattern

True if the object name (not the full path, just the name) matches pattern. The evaluation is done according to shell pattern matching rules.

-nnodes n

True if the object is a combination and has n nodes. This option also supports supplying <, >, <=, and >= in front of the number to support returning true for objects with node counts less than, greater than, less than or equal to, and greater than or equal to n.

-path pattern

True if the object path matches pattern. The evaluation is done according to shell pattern matching rules.

-print

Evaluates to TRUE - used to print out the path and name of the object.

-regex pattern

True if the object path matches pattern. Pattern evaluation is done using Regular Expression matching.

-stdattr

Returns TRUE if an object has ONLY standard attributes associated with it. Standard attributes in BRL-CAD are:


-type pattern

Returns TRUE if the type of the object matches pattern. Pattern evaluation is done using shell pattern matching. Types recognized include:



EXAMPLES

The following are run from the MGED command prompt: