From: Avdi Grimm Date: 2008-08-12T23:44:05+09:00 Subject: Re: Sigh! I'm depressed. Debian vs Ruby and the backtick and subshells >> I am using Debian sid, which sh is bash. >> And, in fact, I hate ruby's way of system call. Ugly and hard to use and >> stupid hardcoded. > > The choice of `` is deliberate. It's to inspire you to get off your lazy > butt and learn the Ruby-internal way to do something, such as Pathname.glob. > There's always a way to avoid a shell command... The backtick syntax is a convenience inherited from Bash and Perl. It makes one very common simple case of shell interaction easy and concise. I typically only use backticks in quick one-off scripts. If I need to interact with the shell in a larger program I avoid it and use either system() (for clarity) or popen*() (for greater control). -- Avdi Home: http://avdi.org Developer Blog: http://avdi.org/devblog/ Twitter: http://twitter.com/avdi Journal: http://avdi.livejournal.com