I am trying to redirect the rtarea output to a file using the redirection ">" operator such as:
rtarea model.g region.r > file.txt
It does not work. The file is created but is not populated with the rtarea information. Even using the pipe doesn't work:
rtarea model.g region.r | tee -a file.txt
Am I doing something wrong or does the pipe and redirection commands not work with rtarea? Thanks!
I will apologize for the version omission. It is the Linux 7.12.2 version
The output is going to stderr instead of stdout. The ">" operator only redirects stdout by default. To redirect both:
rtarea model.g region.r > file.txt 2>&1
rtarea mode.g region.r 2>&1 | tee -a file.txt
Worked great! Thanks Sean!