From: Tim X Date: 2007-04-26T19:05:05+09:00 Subject: Re: Is it possible to make system use bash instead of sh? Wai Tsang writes: > 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. > > -- Others have indicated how you can execute the command with bash rather than sh. However, I'm interested in why you have problems with redirecting standard error with sh bat not bash. While I seem to remember bash offers some additional functionality, I thought redirecting of stdin/stdout/stderr was pretty similar, if not in syntax at least in functionality. Also, its been some time since I did java, but from memory, it uses quite a few shell wrapper scripts and they are all in sh rather than bash. Just interested. tim -- tcross (at) rapttech dot com dot au