
grep_attr - grep attribute values of CM Synergy objects

grep_attr [options] [pattern | -f file] attribute [objectname... | -q query]
attribute name of CM Synergy attribute pattern Perl regular expression objectname name of a CM Synergy object Common options: -D PATH | --database PATH database path -H HOST | --host HOST engine host -U NAME | --user NAME user name -P STRING | --password STRING user's password --ui_database_dir PATH path to copy database information to Options: -c print of count of matching lines for each object processed -f FILE obtain patterns from FILE, one per line -H suppress prefixing of objectnames on output -i perform case-insensitive search -l print only the objectname of each matching object -q QUERY operate on objectnames returned by "ccm query QUERY" -s safe (but slow) mode when using query -F interpret pattern(s) as fixed strings Either "pattern" or "-f file" must be supplied. At least one "objectname" or "-q query" must be supplied.

grep_attr retrieves the value of attribute attribute for each object specified (or returned by query). The value string is then grepped using the Perl regular expression pattern. Matching lines are printed to stdout, prefixed with the objectname followed by a colon.

suppress normal output; instead print of count of matching lines for each object processed
obtain patterns from file, one pattern per line. Note that the second argument must be omitted when using this option.
suppress prefixing of objectnames on output
perform case-insensitive search
suppress normal output; instead print only the objectname of each matching object
operate on objectnames returned by ccm query query; when using this option, no objectnames must be specified on the command line
safe, but slower operation; this is only relevant when using the -q option. When using a query, grep_attr performs the query and retrieval of attribute values in a single call to ccm query. This saves a lot of ccm attribute -show calls, but may overflow the 10 MB buffer for query results in the CM Synergy engine, esp. when the query returns many objects and the attribute values have substantial size. If -s is specified, grep_attr queries for objectnames only and then calls ccm attribute -show in a loop over the returned objectnames.
interpret pattern(s) (either given as second argument or from file) as fixed strings, inestead of Perl regular expressions

See "GetOptions" in VCS::CMSynergy::Helper.

Roderich Schupp, argumentum GmbH <schupp@argumentum.de>