[R] system command to a specific shell (bash)

Uwe Ligges ligges at statistik.tu-dortmund.de
Tue Apr 17 14:20:22 CEST 2012



On 17.04.2012 01:26, MacQueen, Don wrote:
> I believe that shell() was superceded by system(), quite a long time ago.


Not really, under Windows, shell() will start a shell while system() won't.

Uwe Ligges


> However, I get this:
>
>> foo<- system('printenv',intern=TRUE) ; foo[grepl('SHELL',foo)]
> [1] "SHELL=/bin/tcsh"       "XTERM_SHELL=/bin/tcsh"
>
> And tcsh is my login shell, i.e., as specified for my account at the OS
> level. To me, this implies that you should get bash by default if your
> account is configured for bash, but I can't know for certain.
>
> -Don
>
>
>



More information about the R-help mailing list