From: "Sandor Szücs" Date: 2009-01-24T01:14:37+09:00 Subject: Re: quoting problem with %x On 23.01.2009, at 01:58, Will Parsons wrote: > How do I get the output from this within ruby? If I run: > > %x[progname -o 'something with spaces'] > > the single quotes get lost and the result is as if > "progname -o something with spaces" had been invoked. > > Attempting to escape the quotes like: > > %x[progname -o \'something with spaces\'] > > doesn't help. Can someone enlighten me on how this can be done? >> %x[echo \'bla\'] => "bla\n" >> %x[echo \\'bla\\'] => "'bla'\n" Try it in irb and you will see what you get. Regards, Sandor Szücs --