Using the generic ARM C library, the standard input (stdin), output (stdout) and error streams (stderr) can be redirected at runtime. For example, if mycopy is a program, running on a host debugger, that copies the standard input to the standard output, the following line runs the program:
mycopy < infile > outfile 2> errfile
and redirects the files as follows:
stdin
The file is redirected to infile
stdout
The file is redirected to outfile
stderr
The file is redirected to errfile.
The permitted redirections are:
0< filename
This reads stdin from filename.
< filename
This reads stdin from filename.
1> filename
This writes stdout to filename.
> filename
This writes stdout to filename.
2> filename
This writes stderr to filename.
2>&1
This writes stderr to the same place as stdout.
>& file
This writes both stdout and stderr to filename.
>> filename
This appends stdout to filename.
>>& filename
This appends both stdout and stderr to filename.
//From ADS Compilers and Libraries Guide