Search code examples
clearcasecleartool

ClearCase: Query labels with specific attribute value


How can I query all labels that satisfy the list of conditions below?

  • Label is NOT locked or obsolete
  • Label has an attribube My_Attribute containing the value myvalue

Solution

  • Use cleartool lbtype -kind lbtype combined with fmt_ccase.

    That is:

    cleartool lbtype -kind lbtype -fmt "%n Lock status: %[locked]p %a"
    

    You can the grep the content for what you are looking for

    grep -v locked 
    grep -v obsolete
    grep "My_Attribute=myvalue"