I am working on a script to create a clearcase view and perform some other functions.
In the setview function, when used inside a script, for performing operations on the view, the recommended command format is
cleartool setview -exec "commands" view_name
For the "commands" part, I want to use a function defined in the same shell script prior to this call. It seems it is not working when I do the following:
cleartool setview -exec "function_name(var1, var2)" view_name
So, the question I have is : can a function be used with "exec" command, and if it is possible, what is the syntax?
In one of the SO answers, it mentions not to use setview but to use startview. Since I don't know the difference between the two and I need to perform other actions in the script, I would appreciate any help, if I should not use setview exec mecxhanism.
The reason I am trying to use a function instead of another shell script called from the "exec" is that when using function, I do not have to export the variables that can be used by the called script, since the function is defined in the same script that is calling the setview command.