I am trying to execute multiple commands in one shot but to my surprise only the first command is getting executed and the rest are skipped. And the command is
I'm not sure exactly what you are trying to do as it seems to be part of a larger problem space, but ...
cleartool setact -view view1234 activity456
works to set an activity in the view, then
cd /view/view1234/vobs/app/src/epw/WEB-INF/scripts
will get you there. Or slap them together to get your result:
cleartool setact -view view1234 activity456 && cd /view/view1234/vobs/app/src/epw/WEB-INF/scripts && pwd
The statement is shorthand for if [[
See KSH man page for more information on executing unix commands "in one shot".
A semicolon (;) causes sequential execution of the preceding pipeline; an ampersand (&) causes asynchronous execution of the preceding pipeline (i.e., the shell does not wait for that pipeline to finish). The symbol |& causes asynchronous execution of the preceding pipeline with a two-way pipe established to the parent shell; ... The symbol && ( | | ) causes the list following it to be executed only if the preceding pipeline returns a zero (non-zero) value.