Noah Easterly wrote: > I don't think it's using the $SHELL variable to choose which shell to > use (and I don't trust all the shells to set $SHELL) > > As an example: > > so here's a command that I get different responses on, depending on > which shell it's run in > > sh-2.05b$ ls **/*.rb | wc -l > 1 > sh-2.05b$ zsh -c "ls **/*.rb | wc -l" > 12 > > And in ruby backticks, I get the sh response > > sh-2.05b$ ruby -e "puts %x{ls **/*.rb | wc -l}" > 1 How about ruby -e "puts %x{zsh -c 'ls **/*.rb' | wc -l}" I would not trust ruby to figure out the "correct" shell. I would not even be surprised if it was hardwired to /bin/sh for consistent behavior. -Nate