The fmt_ccase documentation for cleartool
gives this as a formatting option:
%[p]p
Property value: Displays the value of the property specified in square brackets. If multiple values are returned, they are separated by spaces.
However, the page doesn't list the possible values for [p]
as far as I can tell, and I can't find any other reference to this anywhere in the ClearCase documentation.
I would like to use this to format output from lstype
for scripting purposes, to print out properties of a type such as the supertype and type manager. Can anyone point me in the right direction?
Here is sample output for what I'm ultimately trying to do:
foo
superfoo
foo_mgr
where foo
is the type, superfoo
is the supertype of foo
, and foo_mgr
is the type manager for foo
.
You will find all the properties in the fmt_ccase page.
Format strings for command output
-fmt
option syntax (used in various reporting commands:annotate
,describe
,lshistory
,lscheckout
, and so on):
-fmt "format-string"
format-string is a character string, composed of alphanumeric characters, conversion specifications, and escape sequences. It must be enclosed in double quotes (
"
).
More precisely, the section:
%[p]p
Property value: Displays the value of the property specified in square brackets. If multiple values are returned, they are separated by spaces.
For instance:
Display the type of a file element.
cleartool describe -fmt "Type: %[type]p\n" util.c@@
Type: text_file
See an lstype
example at "How to find all the branch type created by one person in ClearCase?".