Open System Services Shell and Utilities Reference Manual (G06.28+, H06.05+)

osh(1) OSS Shell and Utilities Reference Manual
Any les that are the target of POSIX.2 redirection must be capable of being opened by
the OSS le system. See the open(2) reference page either online or in the Open System
Services System Calls Reference Manual for the kinds of les accessible.
POSIX.2 redirection specications can appear anywhere in the command line. The
specications (and redirection operators within them) are processed in the order they
appear, from left to right.
osh supports only le descriptors 0 through 9. Leading zeros are allowed.
In the following descriptions, if the le descriptor number is omitted and the rst character of the
redirection operator is <, the redirection refers to the standard input le (le descriptor 0). If the
rst character of the redirection operator is >, the redirection refers to the standard output le (le
descriptor 1). You must specify le descriptor 2 to refer to the standard error le.
Redirecting Input
[n]<pathname Redirection of input opens the named le for read access on le
descriptor n. The standard input le (le descriptor 0) is used if n
is not specied.
Redirecting Output
[n]>pathname or [n]>|pathname
Redirection of output opens the named le or pipe for write
access on le descriptor n. The standard output le (le descrip-
tor 1) is used if n is not specied.
If the named le does not exist, it is created. If the named le
does exist, it is truncated to zero length.
Appending Redirected Output
[n]>>pathname Redirection of output opens the named le for append access on
le descriptor n. The standard output le (le descriptor 1) is
used if n is not specied.
If the named le does not exist, it is created.
Redirecting Input and Output
[n]<>pathname Redirection of both input and output opens the named le for both
read and write access on le descriptor n. The standard input le
(le descriptor 0) is used if n is not specied.
If the named le does not exist, it is created.
Duplicating Input
[n]<&fd Duplicates input le descriptors. If the fd argument consists of
one or more digits, the le descriptor n is made a copy of le
descriptor fd.Iffd is -, le descriptor n is closed. If n is not
specied, the standard input le (le descriptor 0) is used.
6100 Hewlett-Packard Company 527188-007