Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

clearcase: find -name not allow multiple patterns?

I wanna find *.cs and *.cpp files through cleartool find command. But it failed.

cleartool find "M:\test_view\code" -name "*.cs *.cpp"  -print

Nothing can be found based on above even there are matched files in that folder.

How to set multiple file-name patterns ?

like image 555
Meng Avatar asked Apr 09 '26 14:04

Meng


2 Answers

The query language offer some possibility for Compound queries (query || query)

But the cleartool find has none of those operators for the -name option.

The best you can do, following the cleartool wildcard syntax, is

cleartool find "M:\test_view\code" -name "*.c[sp]*" -print
like image 61
VonC Avatar answered Apr 11 '26 07:04

VonC


This is a bit late but perhaps this will help someone. One option is to wrap this is a for loop:

    :: namelist.txt contains a list of file types  ( *.cs, *.cpp, )

FOR /F "tokens=1" %%A IN (c:\bin\namelist.txt) DO ( cleartool find "M:\test_view\code" -all -type f -name %%A -print)
like image 31
emptyshell Avatar answered Apr 11 '26 05:04

emptyshell



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!