You can combine the find with a exec directive if needed (test both):
cleartool find -cview -all -element '\!lbtype_sub(LABEL_1)' -print
cleartool find -cview -all -element '\!lbtype_sub(LABEL_1)' -exec 'cleartool descr -fmt "%En\n" "$CLEARCASE_PN"'
Notes:
- Unix syntax
-element '\!lbtype_sub(LABEL_1)'
looks for all the elements (files) with no version with a certain label (hence the _sub
associated with the lbtype
query)
- fmt is a fmt_ccase directive for the
describe
command.
- "%En": Element name: For a file system object, its standard file or element name, or its path name; for a type object, its name.
"$CLEARCASE_PN"
is between double-quotes because it may have spaces in its pathname/filename.
As noted in the OP's own answer (Luciano), if you don't need to see all elements (included deleted ones), but only elements currently visible in the view, -nxname
is enough:
cleartool find -cview -nxn -element '\!lbtype_sub(LABEL_1)' -print
I still use -element
instead of -version
, because it is much faster and avoid useless duplicates.