You can use cd in a bash script with cleartool
command (Single command mode).
In Windows, a dynamic view would be accessed with
cd m:\MyDynamicView
After that, any cleartool command would be executed in the context of that directory (dynamic view)
Same for a snapshot view.
cd c:\path\to\root\snapshotview
The UNC path is reserved for the view storage (which must be accessible for any client).
It is not for the view root directory.
See this answer as an example of cleartool
commands used after a cd
: they can be used in a script without problem.
Note that you have to start the view first (if it is a dynamic view): see this answer to see a concrete example.