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.

v If –S is not specified, the shell searches for the file in the current working<br />

directory, then in PATH. The file must have read access permitted for the user.<br />

Executable access permission is not necessary.<br />

In addition to these options, you can use any valid option to the set command<br />

(including –o option) as a command-line option to sh. See set for details.<br />

<strong>Command</strong> Syntax<br />

The shell implements a sophisticated programming language that gives you<br />

complete control over the execution and combination of individual commands.<br />

When the shell scans its input, it always treats the following characters specially:<br />

; & ( ) < > | ’ \ "<br />

space tab newline<br />

If you want to use any of these characters inside an actual argument, you must<br />

quote the argument (so that the shell does not use the special meanings of the<br />

characters). See “Quoting” on page 558 for more information.<br />

A simple command is a list of arguments separated by characters in the IFS<br />

environment variable (the default value of IFS has blank, tabs, and newlines).<br />

When a word is preceded by an unescaped pound sign (#), the remainder of the<br />

line is treated as a comment, and the shell discards input up to but not including the<br />

next newline. When a command starts with a defined alias, sh replaces the alias<br />

with its definition (see alias).<br />

A reserved-word command starts with a reserved word (for example, if, while, or<br />

for). Reserved-word commands provide flow of control operations for the shell.<br />

These are described in “Reserved-Word <strong>Command</strong>s” on page 552.<br />

A command can be any of the following:<br />

command:<br />

simple command<br />

reserved-word command<br />

(command)<br />

command |command<br />

command &&command<br />

command ||command<br />

command &command<br />

command &<br />

command |&<br />

command ;command<br />

command ;<br />

command<br />

The following is the order of precedence of the preceding operators. The highest<br />

priority operators are listed first, and operators on the same line have equal priority.<br />

()<br />

|<br />

&& ||<br />

& |& ; <br />

The meaning of these operations is as follows:<br />

(command)<br />

Runs command in a child shell. The current shell invokes a second shell,<br />

sh<br />

Chapter 2. Shell command descriptions 551

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

Saved successfully!

Ooh no, something went wrong!