On 4/25/07, Wai Tsang <simotsa / gmail.com> wrote: > Hi, > > Does anyone know if it is possible to use bash instead of sh as the > default shell when "system" is executed? > > For example, system("java --version") is executing java --version in sh, > instead of bash, which can be a problem when I tried to do error > redirection. > > -- > Posted via http://www.ruby-forum.com/. > If bash is in your path you can do system("bash -c \"java -version\"") else you just have to put the full path, this works even on Windows :) Of course that is not exactly what you want, you would like to tell Kernel or whatever other object that wants to hear that kind of message: "You are going to use /bin/bash for system from now on". So I went digging the code, no such luck, I just could not find the definition of Kernel#system :( neither with rb_define_method.*system nor with def\s*system and even less with alias\s*system or rb_alias.*system Hope that somebody more learned will help us out here. Cheers Robert > -- You see things; and you say Why? But I dream things that never were; and I say Why not? -- George Bernard Shaw