From: "Ara.T.Howard" Date: 2005-06-24T00:21:51+09:00 Subject: Re: Shell type On Thu, 23 Jun 2005, Panich, Alexander wrote: > Under Linux, by default, method Kernel.system(command) (backticks as > well) executes command in the subshell of SH type. > > Is there a way to define another shell type (CSH for example) to execute > there, or not? there shouldn't be, according to iso and posix c. you can always do something like: harp:~ > cat a.rb def csh_system cmd pipe = IO::popen 'csh', 'r+' pipe.puts cmd pipe.close_write buf = pipe.read pipe.close_read status = $?.exitstatus raise SystemCallError::new(status), cmd unless status == 0 buf end stdout = csh_system 'echo 42' p stdout harp:~ > ruby a.rb "42\n" i used to have csh interface in session, but took it out due to some issues with stdout/stderr separation... cheers. -a -- =============================================================================== | email :: ara [dot] t [dot] howard [at] noaa [dot] gov | phone :: 303.497.6469 | My religion is very simple. My religion is kindness. | --Tenzin Gyatso ===============================================================================