

C-LANG Statements › SHELL Statement—Specify UNIX Shell to Run Script
SHELL Statement—Specify UNIX Shell to Run Script
The SHELL statement specifies the shell used to run the script named in the SCRIPTNAME statement.
A shell is a program that provides an environment for users to interact with the system. Shell programs are files that contain a series of user commands that are grouped, using logic provided by the shell, to accomplish a task.
Supported Job Type
This statement is optional for the UNIX job type.
Syntax
This statement has the following format:
SHELL shell_name
- shell_name
-
Specifies the name of the shell used to execute the script or command file. You can specify any of the following UNIX shells:
- /bin/ksh (Korn shell)
- /bin/sh (Bourne shell)
- /bin/bash (Bourne again shell)
- /bin/csh (C shell)
- /usr/local/bin/perl (Perl shell)
Notes:
- The shell can be specified in different places. To run a UNIX script, the agent uses, in the following order, the shell specified in the following places:
- The SHELL statement (if specified in the job definition)
- The first line of the script (if the SHELL statement is not specified)
- The oscomponent.defaultshell parameter in the agentparm.txt file (if not specified in the SHELL statement or in the script)
- The user default shell defined in the user profile (if not specified in one of the previous three locations)
- You must define all shells that you want the agent to use with the oscomponent.validshell parameter in the agentparm.txt file or set the oscomponent.checkvalidshell parameter to false. For more information on the oscomponent.defaultshell and oscomponent.validshell parameters, see the CA Workload Automation Agent for UNIX, Linux, or Windows Implementation Guide.
- Different shells provide different facilities and have different characteristics. Certain functions are specific to certain shells and may be incompatible with other shells.
Example: Specify a Shell to Run a Script
This example uses the C shell to run the sort script on the UNIX_LA agent computer:
AGENT UNIX_LA
SCRIPTNAME /mfg/test/sort
SHELL /bin/csh
Copyright © 2013 CA Technologies.
All rights reserved.
 
|
|