Open System Services Shell and Utilities Reference Manual (G06.29+, H06.08+, J06.03+)

User Commands (m - o) osh(1)
osh POSIX.2 redirection specifications are a subset of those defined for a POSIX-conformant shell.
The following rules apply:
All pathnames specified must use OSS pathname syntax. Relative pathnames are resolved
(expanded) using the initial working directory specified in the OSS environment variable
PWD passed to the child process.
Any files that are the target of POSIX.2 redirection must be capable of being opened by
the OSS file system. See the open(2) reference page either online or in the Open System
Services System Calls Reference Manual for the kinds of files accessible.
POSIX.2 redirection specifications can appear anywhere in the command line. The
specifications (and redirection operators within them) are processed in the order they
appear, from left to right.
osh supports only file descriptors 0 through 9. Leading zeros are allowed.
In the following descriptions, if the file descriptor number is omitted and the first character of the
redirection operator is <, the redirection refers to the standard input file (file descriptor 0). If the
first character of the redirection operator is >, the redirection refers to the standard output file (file
descriptor 1). You must specify file descriptor 2 to refer to the standard error file.
Redirecting Input
[n]<pathname Redirection of input opens the named file for read access on file
descriptor n. The standard input file (file descriptor 0) is used if n
is not specified.
Redirecting Output
[n]>pathname or [n]>|pathname
Redirection of output opens the named file or pipe for write
access on file descriptor n. The standard output file (file descrip-
tor 1) is used if n is not specified.
If the named file does not exist, it is created. If the named file
does exist, it is truncated to zero length.
Appending Redirected Output
[n]>>pathname Redirection of output opens the named file for append access on
file descriptor n. The standard output file (file descriptor 1) is
used if n is not specified.
If the named file does not exist, it is created.
Redirecting Input and Output
[n]<>pathname Redirection of both input and output opens the named file for both
read and write access on file descriptor n. The standard input file
(file descriptor 0) is used if n is not specified.
If the named file does not exist, it is created.
Duplicating Input
[n]<&fd Duplicates input file descriptors. If the fd argument consists of
one or more digits, the file descriptor n is made a copy of file
descriptor fd.Iffd is -
, file descriptor n is
closed. If n is not
527188-021 Hewlett-Packard Company 6101