I meet a problem that when I run clearcase command:
ct find . -branch 'brtype(my_branch)' -exec "echo %CLEARCASE_XPN%"`
%CLEARCASE_XPN% not parsed as a variable and the output is:
%CLEARCASE_XPN%
%CLEARCASE_XPN%
%CLEARCASE_XPN%
...
But I’m sure CLEARCASE_XPN is the variable denotes the whole path of the found file.
Can anybody help? OS is linux, shell is tcsh, thanks!
Use:
%CLEARCASE_XPN%is a windows syntax.$CLEARCASE_XPNis the unix syntax, that you can use in your Linux tcsh session.See “
cleartool find” and “Additional examples of the cleartool find command” for many examples using the unix syntax.Note also the use of simple quotes around the exec directive:
-exec 'echo $CLEARCASE_XPN'.That will prevent the shell itself to interpret immediately the
$CLEARCASE_XPNvariable (which is unknow for the tcsh session) and will allow the cleartool find to pass the right value to the exec directive, replacing$CLEARCASE_XPNwith the extended pathname.See “String quoting (single quote) vs. Weak Quoting (double quote)“: