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
Don't use cleartool setview: it forks the current shell in a subshell, which is why the rest is skipped when executed in a single line.
And which is why it works when executed one by one (the last two are executed in the subshell)
Always work with the full path of the dynamic view: /view/aview/vobs/avob/..., instead of setview (which you don't need).
If you must use cleartool setview, then use it with the -exec option (as in this answer):
cleartool setview -login -exec "command 1; command 2; command 3" view_tag
In your case:
cleartool setview -exec 'cleartool setactivity activity456 ; cd /vobs/app/src/epw/WEB-INF/scripts ; pwd' view1234
Without setview:
The OP asks:
Say my view named
humanbeingis inuniverse/planet/earth/humanbeing.vwsHow do I use the startview command?
Is it something like
cleartool startview universe/planet/earth/humanbeing
or
cleartool startview cd universe/planet/earth/humanbeing
In both the cases it says the Error: Couldn't set view tag
universe/planet/earth/humanbeing
To be sure, do a cleartool lsview -s | grep humanbeing: that will give you the view tag.
That should be:
cleartool startview humanbeing
cd /view/humanbeing/vobs/
universe/planet/earth/humanbeing.vws is the view storage, not a view tag.
Make sure that
cleartool mount /vobs/avob)myapp/WEB-INF/scripts is present in /view/humanbeing/vobs/Don't try to do any symlink in /vobs: /vobs is a special MVFS (Multi-Version FileSystem) mounting point, not a regular folder.
Make sure your webapp search for apps in another path than /vobs.