rtarea redirection/pipe help

  • Brian

    Brian - 2009-05-11

    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!

    • Brian

      Brian - 2009-05-11

      I will apologize for the version omission. It is the Linux 7.12.2 version

    • Sean Morrison

      Sean Morrison - 2009-05-11

      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


    • Brian

      Brian - 2009-05-12

      Worked great! Thanks Sean!


Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.

No, thanks