Editing MGED CMD ls

From BRL-CAD

Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision Your text
Line 1: Line 1:
[[Category:MGED|Ls]]
+
[[Category:MGED]]
[[category:MGED geometry information commands|Ls]]
 
=ls=
 
__TOC__
 
 
 
==Syntax==
 
:ls [-A -o -a -c -r -s -p <nowiki>-l</nowiki>] [objects]
 
 
 
 
 
==Argument(s)==
 
: '''[-A]'''
 
:: Optional.  Use attribute name/value pairs.
 
 
 
: '''[-o]'''
 
:: Optional.  Match at least one attribue name value pair.
 
 
 
: '''[-a]'''
 
:: Optional.  List all objects in db.
 
 
 
: '''[-c]'''
 
:: Optional.  List all non-hidden objects in database.
 
 
 
: '''[-r]'''
 
:: Optional.  List all non-hidden regions in database.
 
 
 
: '''[-s]'''
 
:: Optional.  List all non-hidden primitives in database.
 
 
 
: '''[-p]'''
 
:: Optional.  List all non-hidden primitives in database.
 
 
 
: '''[-l]'''
 
:: Optional. Display results in long format showing object name, object type, major type, minor type, and length.
 
 
 
: '''[objects]'''
 
:: Optional.  Object(s) to list.
 
 
 
 
 
==Return Value(s)==
 
: No Return Values for this command.
 
 
 
 
 
==Description==
 
The "ls" command with no object argument lists the name of every object in the database (in alphabetical order) except for those marked as hidden with the [[MGED_CMD_hide|hide]] command. If the object argument is supplied, only those objects are listed. The object argument may include regular expressions. If the -A option is used, then the arguments are expected to be a list of attribute name/value pairs, and objects having attributes that match the provided list are listed. By default, an object must match all the specified attributes in order to be listed; however, the -o flag indicates that an object matching at least one attribute name/value pair should be listed. See the [[MGED_CMD_attr|attr]] command for information on how to set or get attributes. Regular expressions are not supported for attributes.
 
 
 
 
 
==Example(s)==
 
: '''mged&gt;'''  ls shape*
 
:: List all objects with names beginning with "shape" (output is formatted).
 
 
 
: '''mged&gt;'''  ls -a shape*
 
:: List all objects with names beginning with "shape."
 
 
 
: '''mged&gt;'''  ls -p wheel*
 
:: List all primitives with names beginning with "wheel."
 
 
 
: '''mged&gt;''' ls -r wheel*
 
::  List all regions with names beginning with "wheel."
 
 
 
: '''mged&gt;'''  ls -c suspension*
 
:: List all combinations with names beginning with "suspension."
 
 
 
: '''mged&gt;'''  ls -A -o -r Comment {First comment} Comment {Second comment}
 
::  List all regions that have a "Comment" attribute that is set to either "First comment" or "Second comment."
 
 
 
 
 
==See Also==
 
: [[MGED_CMD_l|l]]
 
: [[MGED_CMD_lm|lm]]
 
: [[MGED_CMD_hide|hide]]
 
: [[MGED_CMD_attr|attr]]
 
 
 
----
 
 
 
Page Generated by David Loman on: 10/11/2007 at: 1:48:34 PM
 

Please note that all contributions to BRL-CAD may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see BRL-CAD:Copyrights for details). Do not submit copyrighted work without permission!

To edit this page, please answer the question that appears below (more info):

Cancel Editing help (opens in new window)