User guide

12.1.3 Shell Operators
The UNIX command line makes use of some Bourne shell operators to complete a
command. In OpenVMS, some commands take parameters. The shell operators
are similar but are much more powerful because you can use them to combine
commands. These operators are described in Table 12–2.
Table 12–2 Console Shell Operators
Operator Name Description
> Output creation Writes output to a specified destination, such as a file.
Form: > destination
>> Output append Adds output to the destination.
Form: >> destination
< Input redirection Reads input from the source.
Form: < source
<< Here document Reads input from standard input until the specified
string is found at the beginning of a line.
Form: << string
| Pipe Uses output of the first command as the input for the
second command.
Form: cmd1 | cmd2
; Sequence Runs the first command to completion before running
second command.
Form: cmd1 ; cmd2
\ Line continuation Continues the command on the next line. The prompt
changes to _> until the command is completed.
Form:
cmd1 \ _> cmd2
# Line comment Ignores the text that follows the operator. Used for
embedding comments in command scripts or logs.
Form: # text
& Background Runs the command in a background process. The
command line remains available for a new command.
Form: cmd &
&a Affinity Runs the process on the CPU allowed by the processor
affinity mask, m. Multiple processors can be specified
using a list or range.
Form: &a m
(continued on next page)
Console Primer 12–3