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.

sh — Invoke a shell<br />

Format<br />

Description<br />

[r]sh [±abCefhiKkLmnPprtuvx] [±o option] [cmd_file [argument ...]]<br />

[r]sh –S [±abCefhiKkLmnPprtuvx] [±o option] [cmd_file [argument ...]]<br />

[r]sh –c cmdstring [±abCefhiKkLmnPprtuvx] [±o option] [cmd_name [argument<br />

...]]<br />

[r]sh –s [±abCefhikLmnPprtuvx] [±o option] [argument ...]<br />

sh contains the following topics and subtopics:<br />

v Options and invocation<br />

v Options<br />

v <strong>Command</strong> syntax<br />

v Reserved-Word <strong>Command</strong>s<br />

v <strong>Command</strong> execution<br />

v Quoting<br />

v Directory substitution<br />

v Parameter substitution<br />

v Arithmetic substitution<br />

v <strong>Command</strong> substitution<br />

v File descriptors and redirection<br />

v Filename generation<br />

v Variables<br />

v Shell execution environments<br />

v Built-in commands<br />

v Examples<br />

v Shell Variables<br />

v Files<br />

v Localization<br />

v Exit Values<br />

v Messages<br />

Subtopics dealing with substitution and interpretation of input appear in the order in<br />

which the shell performs those substitutions and interpretations.<br />

Much of what the shell can do is provided through such built-in commands as cd<br />

and alias.<br />

Options and Invocation<br />

The z/<strong>OS</strong> shell, based on the KornShell, is upward-compatible with the Bourne<br />

shell.<br />

Normally you invoke the shell by logging in. You can also invoke the shell by typing<br />

an explicit sh command. Some people find it useful to copy the sh file into a file<br />

named rsh. If you invoke the shell under the name rsh, the shell operates in<br />

restricted mode. This mode is described in connection with –r.<br />

If you invoke the shell with a name that begins with the – character, it is a login<br />

shell. (You can also get a login shell if you invoke the shell with the –L option.) A<br />

login shell begins by running the file /etc/profile.It then runs $HOME/.profile using<br />

the . command (see dot). If HOME is not set, the shell searches the working<br />

directory for:<br />

.profile<br />

sh<br />

Chapter 2. Shell command descriptions 549

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

Saved successfully!

Ooh no, something went wrong!