Programming and posix - April 2002

April 3, 2002
Solution Symposium
Page 78
hp e3000
programming
and posix
posix shell i/o redirection
<file - read stdin from file
>file - write stdout to file
>>file - append stdout to file
2>file - write stderr (2) to file
2>&1 - write stderr (2) to the same place as stdout (1)
<<name - read stdin from the following lines of shell input
until a line consisting of name is found
/bin/cat <<ALLDONE >file
here is some data
to be copied to a file
ALLDONE