Modelsim runs TCL. Bash would need to be handed over to the OS. tcl has an "exec" command that passes instructions to the OS.
Also, anything the TCL interpreter doesnt understand, it should pass directly to the OS.
For more complete information about compiler optimizations, see our Optimization Notice.