Redirect standard output (PR#14148)

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Redirect standard output (PR#14148)

joemsong
Full_Name: Joe Song
Version: 2.10.0
OS: Windows 7
Submission from: (NULL) (97.123.159.234)


Symptom: The following command in R

> system("program > run.log")

would not redirect standard output to the file "run.log".

This bug did not exist on Windows XP, but appeared on Windows 7 when the same
program is run.

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel
Reply | Threaded
Open this post in threaded view
|

Re: Redirect standard output (PR#14148)

Romain Francois
On 12/15/2009 09:20 PM, [hidden email] wrote:

>
> Full_Name: Joe Song
> Version: 2.10.0
> OS: Windows 7
> Submission from: (NULL) (97.123.159.234)
>
>
> Symptom: The following command in R
>
>> system("program>  run.log")
>
> would not redirect standard output to the file "run.log".
>
> This bug did not exist on Windows XP, but appeared on Windows 7 when the same
> program is run.

Then send this to microsoft.

--
Romain Francois
Professional R Enthusiast
+33(0) 6 28 91 30 30
http://romainfrancois.blog.free.fr
|- http://tr.im/HlX9 : new package : bibtex
|- http://tr.im/Gq7i : ohloh
`- http://tr.im/FtUu : new package : highlight

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel
Reply | Threaded
Open this post in threaded view
|

Re: Redirect standard output (PR#14148)

Prof Brian Ripley
In reply to this post by joemsong
On Tue, 15 Dec 2009, [hidden email] wrote:

> Full_Name: Joe Song
> Version: 2.10.0
> OS: Windows 7
> Submission from: (NULL) (97.123.159.234)
>
>
> Symptom: The following command in R
>
>> system("program > run.log")
>
> would not redirect standard output to the file "run.log".
>
> This bug did not exist on Windows XP, but appeared on Windows 7 when the same
> program is run.

Please do read the help for system() on your OS.  It is not a bug to
do what it is documented to do!  The help page gives you the
workaround (and has for several years).

And a number of people using XP did start finding it this year: it
seems related to a MS update.

--
Brian D. Ripley,                  [hidden email]
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel
Reply | Threaded
Open this post in threaded view
|

Re: Redirect standard output (PR#14148)

Duncan Murdoch
In reply to this post by joemsong
On 15/12/2009 3:20 PM, [hidden email] wrote:

> Full_Name: Joe Song
> Version: 2.10.0
> OS: Windows 7
> Submission from: (NULL) (97.123.159.234)
>
>
> Symptom: The following command in R
>
>> system("program > run.log")
>
> would not redirect standard output to the file "run.log".
>
> This bug did not exist on Windows XP, but appeared on Windows 7 when the same
> program is run.

That doesn't work on XP if program is an .exe, and I wouldn't expect it
to.  The system() command on Windows doesn't process redirects.  See the
documentation.

Duncan Murdoch

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel