On Tue, Aug 12, 2008 at 1:48 AM, John Carter <john.carter / tait.co.nz> wrote:
> Thus on Debian (and Debian derivatives like Ubuntu) Rubies backtick
> (iff there is a glob or a redirection present) is HARDCODED to /bin/sh
> but will (depending on the users whim) give you dash or bash.

For as long as I've been working with *nix systems the rule was
always: either *explicitly* invoke Bash, or understand and use only
the lowest common denominator bourne-compatible shell features.  In
fact, the best practice is to only use features which are common to
both Bourne and CSH-compatible shells.  It may come as a shock, but
there are actually more *NIXen than Linux, and many of them don't use
Bash as the default shell.

If you expect portability, you shouldn't be be doing anything that
depends on bash-specific features in your #system()/backtick calls.
If you need to invoke a specific shell, the popen() family of methods
are your friends.

-- 
Avdi

Home: http://avdi.org
Developer Blog: http://avdi.org/devblog/
Twitter: http://twitter.com/avdi
Journal: http://avdi.livejournal.com