How can I select the shell to be used by %x{ stuff }? Setting ENV[‘SHELL’]
doesn’t seem to have any effect. The pickaxe book said this construct invokes
"the host operating system’s standard shell". But suppose I want my script
which uses %x{ stuff } to run both on a box using bash and a box using tcsh?
It seems there must be a way to set this, or else we’d have serious portability
problems. Also, what if I want to make use of some nifty zsh feature in
my %x{ stuff } but my login shell is bash? I haven’t been able to figure
out how to do this.
How can I select the shell to be used by %x{ stuff }? Setting ENV[‘SHELL’]
doesn’t seem to have any effect. The pickaxe book said this construct invokes
“the host operating system’s standard shell”. But suppose I want my script
which uses %x{ stuff } to run both on a box using bash and a box using tcsh?
It seems there must be a way to set this, or else we’d have serious portability
problems. Also, what if I want to make use of some nifty zsh feature in
my %x{ stuff } but my login shell is bash? I haven’t been able to figure
out how to do this.
try %x{ exec zsh -c “stuff” } – force the interpreter to use.
Ari
···
On Thu, Mar 18, 2004 at 03:54:41AM +0900, Bret Jolly wrote:
On Thu, Mar 18, 2004 at 03:54:41AM +0900, Bret Jolly wrote:
Greetings, lovers of Ruby,
How can I select the shell to be used by %x{ stuff }? Setting ENV[‘SHELL’]
doesn’t seem to have any effect. The pickaxe book said this construct invokes
“the host operating system’s standard shell”. But suppose I want my script
which uses %x{ stuff } to run both on a box using bash and a box using tcsh?
It seems there must be a way to set this, or else we’d have serious portability
problems. Also, what if I want to make use of some nifty zsh feature in
my %x{ stuff } but my login shell is bash? I haven’t been able to figure
out how to do this.
try %x{ exec zsh -c “stuff” } – force the interpreter to use.
Ari
Wouldn’t work under windows… portability problem remain then!
I’m also writting something using %x{stuff} and I’d be curious to know
the solution, if it exists.