16.12.2012 Views

z/OS V1R9.0 UNIX System Services Command ... - Christian Grothoff

z/OS V1R9.0 UNIX System Services Command ... - Christian Grothoff

z/OS V1R9.0 UNIX System Services Command ... - Christian Grothoff

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Option<br />

Example<br />

Usage Note<br />

Localization<br />

Exit Values<br />

Portability<br />

Related Information<br />

sh, tcsh<br />

exec in the tcsh shell<br />

In the tcsh shell, exec executes the specified command in place of the currrent<br />

shell. See “tcsh — Invoke a C shell” on page 626.<br />

–a name<br />

The shell passes name as the zero’th argument (argv[0]) to command_line.<br />

–a name can be used to replace the current shell with a new login shell, by<br />

specifying name as a shell with a prefix of a dash (–).<br />

To replace the current shell process with a new login shell (which will run the login<br />

profiles), specify:<br />

exec -a -sh /bin/sh<br />

exec is a special built-in shell command.<br />

exec uses the following localization environment variables:<br />

v LANG<br />

v LC_ALL<br />

v LC_MESSAGES<br />

v NLSPATH<br />

See Appendix F for more information.<br />

If you specify command_line, exec does not return to the shell. Instead, the shell<br />

exits with the exit status of command_line or one of the following exit status values:<br />

1–125 A redirection error occurred.<br />

126 The command in command_line was found, but it was not an executable<br />

utility.<br />

127 The given command_line could not be run because the command could not<br />

be found in the current PATH environment.<br />

If you did not specify command_line, exec returns with an exit value of zero.<br />

P<strong>OS</strong>IX.2, X/Open Portability Guide, <strong>UNIX</strong> systems.<br />

exec<br />

Chapter 2. Shell command descriptions 261

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!