ClearCase: Find files having exactly one specific label and not more -


I would like to find files in the ClearCase labeled with a specific label, but nobody else's example For, if I have files labeled like this:

  file1 LBL_A, LBL_B file2LBL_A  

I have a query Which does not just give me file2 and file1.

Is there a way to do this with Chalnul? If it is not possible to do this with a single question, then I will be happy for any ideas how to do it in many phases (I will call Cleitul from a Perl script, so saving the list of files will be easy And run the next commands on them).

Thanks a long time ago!

Jan

LBL_A believes that you want to run only (only ) Is labeled

  Cleatonal search / some / diary-version 'lbtype (LBL_A)' -print | Xargs cleartool description -fmt should give "% n:% l"  

  file1: (LBL_A, LBL_B) file2: (LBL_A)  

As an output you can then check in your perl script or filter by using sed -n / s / \ (. * \): (LBL_A) / \ 1 / p ' (no colon handling file names).

Update: As Voncchi correctly states, the above commands will fail in files containing free space. To handle that run:

  Cleetool search ... - print | Tr '\ 012' '000' | Xargs-0 clerto ....  

which will translate the new lines into the eski null and then the exaggeration will be used as a delimiter.


Comments

Popular posts from this blog

c++ - Linux and clipboard -

What is expire header and how to achive them in ASP.NET and PHP? -

sql server - How can I determine which of my SQL 2005 statistics are unused? -