From: Albert Schlef Date: 2009-01-07T21:01:29+09:00 Subject: Re: A question about running external program Zhao Yi wrote: > I use this method to run an external program: > > output=`uname -r | sed 's/\([^\.]*\.[^\.]*\)\.*.*/\1/'` > puts output > > ruby will ignore the sed command. Doesn't ruby support "|"? Instead of strugling with shell-escaping, you can do the regexp part in Ruby itself: output = `uname -r` version = output[ /some-regexp/ ] -- Posted via http://www.ruby-forum.com/.