eval command (concatenates arguments into a command and executes it)
- Organization of this page
Format
eval [command [args ...]]
Description
This command concatenates arguments into a command that it executes. The character strings provided as the arguments are interpreted as a single command that is executed.
Arguments
Return codes
Return code |
Meaning |
---|---|
0 |
Normal termination |
127 |
Error termination
|
Other than the above |
Error termination
|
Notes
-
The execution results of this command are not output to the job execution log. Note also that this command does not identify whether the job or job step terminated normally or with an error. Refer instead to the execution results of the command that was called.
-
If the command syntax of this special built-in command is invalid, it exits the shell that is executing the command.
Usage example
-
Change directories to /home/adsh/script.
eval cd /home/adsh/script