1

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
karelok
  • 301
  • 2
  • 9
  • 1
    It should be a case for https://www.ibm.com/support/knowledgecenter/en/SSSH27_9.0.1/com.ibm.rational.clearcase.cc_ref.doc/topics/ct_lstype.htm (ct lstype -king lbtype) Combined it with https://www.ibm.com/support/knowledgecenter/SSSH27_9.0.1/com.ibm.rational.clearcase.cc_ref.doc/topics/fmt_ccase.htm. I'll post an answer later today. – VonC Oct 16 '17 at 07:29

1 Answers1

1

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"
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • It is not exactly the "easy solution" I have been looking for, but I have not found other one. I recomend for the win users [grepWin](http://tools.stefankueng.com/grepWin.html) tool. – karelok Jan 16 '18 at 07:10