Clearcase: find -name not resolving multiple patterns?

I want to find files *.csand *.cppusing command cleartool find. But that failed.

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

Nothing was found based on the above, even in the files there are corresponding files.

How to install multiple file name patterns?

+3
source share
3 answers

The language offers some opportunity for complex queries ( query || query)

But cleartool find does not have any of these operators for the parameter -name.

The best you can do by following cleartool wildcard syntax

cleartool find "M:\test_view\code" -name "*.c[sp]*" -print
+3
source

, , , -. , for:

    :: 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)
+1

, cleartool unix.

If this is correct, you can use '-or'

$ find -type f -name '*.cs' -or '*.cpp' -print
-1
source

Source: https://habr.com/ru/post/1756736/


All Articles