I am writing some command.com scripts to automate some tasks involving ClearCase views. I can use cleartool lsview viewname to determine if the view exists or not. How can I get the output from the lsview subcommand into a variable such that the script does not get terminated by a cleartool error when the view does not exist?
I am writing some command.com scripts to automate some tasks involving ClearCase views. I
Share
If you have a recent enough ClearCase (7.1.x), you can also use:
(replace
<registryServer>by your ClearCase registry server name)In a DOS script, you would redirect that to a file, and then affect the content of said file to a variable:
You can put a condition on setting that VAR with
ERRORLEVEL(test done just after the cleartool command).The advantage is that the cleartool command doesn’t generate any error message, even if the view doesn’t exist.