About cookies on this site Our websites require some cookies to function properly (required). In addition, other cookies may be used with your consent to analyze site usage, improve the user experience and for advertising. For more information, please review your options. By visiting our website, you agree to our processing of information as described in IBM’sprivacy statement. To provide a smooth navigation, your cookie preferences will be shared across the IBM web domains listed here.
OpenExtensions for z/VM "Q"s and "A"s
Question: How can I run a shell script? From the VM shell? From the CMS command line?
Answer: It's simple to run shell scripts from the VM shell. Once the shell is initialized, simply type the name of the shell script on the command line and press enter.
You can also run a shell script from the CMS command line with either of the following commands
OPENVM SHELL /pathname/shellscript_nameor
OPENVM RUN /bin/sh /pathname/shellscript_nameThe former will initialize the shell, run the shell script, and then terminate the shell. The latter will run the shell script without initializing the entire shell.
For more questions and answers, go to our archive of questions and answers.