Good tutorials on redirection are out there. Google on "Linux redirection"
> send to file (create if neccesary)
>> append to file
< read from file
<< read from "here"--eg the terminal
2> redirect errors to file
you can also use "exec" to change file descriptors--eg for the life of a script or segment.