Pregunta

I have a very strange error running the cleartool lsview command under UNIX (version 7.1.2.12).

The command works in general but for some users (!) it gives the following error message :

cleartool: Error: No matching entries found for view tag "user_*".

I encountered this error first in a Perl-script but it is reproducible on the command line as well. I try to do something like :

cleartool lsview user_\*

Where user is the user name. For most users (like myself) cleartool will list my views that start with my user name and are followed by an underscore.

For some other users the command will return a list with their views but in addition it will produce the error message mentioned above. My script obviously checks for ClearCase errors and stops working. If I left out the underscore (any underscores in the pattern!) the error message is gone.

Is there anything I need to be aware of when querying the views of a user? The IT told me to do :

cleartool lsview|grep "user_"

which would work without an error message but I want to understand why the error comes up.

Thanks for reading so far.

¿Fue útil?

Solución

I always use a grep, but I just test in command line (on Windows). This works:

 cleartool lsview prefix_*

In other word, I never had to escape the '*'. This doesn't work:

 cleartool lsview prefix_\*
 cleartool: Error: Invalid view tag: "prefix_\*".

It can depend on how the shell will interpret the '*', as in this similar bug.

Under Unix, you might want to avoid a premature interpretation of the '*' (wildcard expansion) with double-quotes:

cleartool lsview "prefix_*"

The OP user2606240 reports in the comments:

As soon as the _ is in the view name I get the error message.
As far as I understood the registry and registered views that should not be the case.
I think I'll just implement the grep after lsview and live with it.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top