Redirections
A redirection causes a UNIX file descriptor to be
redirected to a different file.
The following options are available:
 < filename
- 
the file is opened on descriptor 0, standard input, for reading only;
it must already exist
 > filename
- 
the file is opened on descriptor 1, standard output, for writing,
and is truncated; it is created if necessary
 >> filename
- 
the file is opened on descriptor 1, standard output,
for append only; it is created if necessary
The following variants are available for each redirection.
In each case ``<'' can be replaced by ``>'' or
``>>''.
 < filename
- 
read from filename
 <[number] filename
- 
read from filename on descriptor number
 <[new=number]
- 
make new a duplicate of number
 <[number=]
- 
close descriptor number
For example:
   for_info < $static_arg
displays the text from file
$static_arg
in a dialog box, and:
   gti 'Enter name:' > name
saves the user's name in a file name.
See also:
Next topic: 
Command substitution
Previous topic: 
Assignment
© 2003 Caldera International, Inc.  All rights reserved.
SCO OpenServer Release 5.0.7 -- 11 February 2003