02.07.2013 Views

A/UX® System Administrator's Reference Sections 1M, 7, and 8

A/UX® System Administrator's Reference Sections 1M, 7, and 8

A/UX® System Administrator's Reference Sections 1M, 7, and 8

SHOW MORE
SHOW LESS

Create successful ePaper yourself

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

StartupShell(8) StartupShell(8)<br />

ments to the invoked program. Each of the constructions affects<br />

processing as described in the following list<br />

word<br />

»word<br />

< & digit<br />

Use file word as st<strong>and</strong>ard output (file descriptor<br />

1). If the file does not exist, it is created; otherwise,<br />

it is truncated to a length of O.<br />

Use file word as st<strong>and</strong>ard output. If the file exists,<br />

output is appended to it (by first seeking to<br />

the end-of-file); otherwise, the file is created.<br />

Use the file associated with file descriptor digit<br />

as st<strong>and</strong>ard input. Similarly, >&digit uses the<br />

file associated with the file descriptor digit as the<br />

st<strong>and</strong>ard output<br />

< & - The st<strong>and</strong>ard input is closed. Similarly, st<strong>and</strong>ard<br />

output is closed by using> & -.<br />

If any of the above are preceded by a digit, the file descriptor is<br />

specified by the digit (instead of the default 0 or 1). For example:<br />

... 2>&1<br />

associates file descriptor 2 with the file currently associated with<br />

file descriptor 1.<br />

The order in which redirections are specified is significant. The<br />

shell evaluates redirections from left to right. For example,<br />

... l>word 2>&1<br />

first associates file descriptor 1 with file word. It associates file<br />

descriptor 2 with the file associated with file descriptor 1 (word).<br />

If the order of redirections were reversed, file descriptor 2 would<br />

be associated with the terminal (assuming file descriptor 1 had<br />

been) <strong>and</strong> file descriptor 1 would be associated with file word.<br />

The environment passed to an executing program contains the<br />

same file descriptors as the shell, except those modified by input<br />

<strong>and</strong> output redirections on the comm<strong>and</strong> line.<br />

Built-in Comm<strong>and</strong>s<br />

Built-in comm<strong>and</strong>s do not invoke corresponding programs that reside<br />

in a file system. Rather, the shell interprets such comm<strong>and</strong>s<br />

<strong>and</strong> their arguments all by itself. For these built-in comm<strong>and</strong>s, input<br />

<strong>and</strong> output redirection is permitted. Without redirection, the<br />

February, 1990<br />

Revision C<br />

5

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

Saved successfully!

Ooh no, something went wrong!