Wha? You two didn't know about output redirection? Class time!
There are three io "Special files" or "Streams" called stdin, for input, stdout, for output and stderr, also for output
$1 > $2 Redirects the stdout from $1 to the file $2, clearing it's contents beforehand, or creating it if it doesn't exist
$1 2> $2 Same as above, except it redirects stderr instead of stdout
$1 > $2 2> $2 Same as the above two, except it redirects both stdout and stderr
$1 < $2 Redirects the contents of file $2 in to the stdin of $1
$1 | $2 Redirects the stdout of $1 to the stdin of $2
I'm not sure about redirecting stderr to stdin, but I'm guessing it's this:
$1 2| $2