From: Tom Felker Date: 2003-09-01T08:46:33+09:00 Subject: Re: `echo %!(*` On Mon, 01 Sep 2003 07:51:55 +0900, Daniel Carrera wrote: > I'm not sure I understand what you're asking about backtick > interpolation. Can you give me a simple example of what you'd like the > backtick to do so I understand beter? oldName = "02_Ship_At_Sea_(Instrumental).ogg" tags = Hash.new `vorbiscomment #{oldName}`.each_line do |line| key, value = line.split("=", 2) tags[key.downcase] = value end # ...use tags to formulate proper filename and rename # Errors: sh: -c: line 1: syntax error near unexpected token `(' sh: -c: line 1: `vorbiscomment 02_Ship_At_Sea_(Instrumental).ogg' .... If you use system, you can pass the arguments in an array, and the shell isn't used, so you can have arguments that the shell would barf on. system("echo !@#$%^&") == "" system("echo", "!@#$%^&") == "!@#$%^&") I need a backtick method that works the same way. Having popen work that way would be nice. As it is, I think it's only possible with popen("-"), having the child exec in such a way as to not interpolate the arguments, and reading from that. -- Tom Felker, - Stop fiddling with the volume knob. ruby -r complex -e 'c,m,w,h=Complex(-0.75,0.136),50,150,100;puts"P6\n#{w}\n#{h}\ n255";(0...h).each{|j|(0...w).each{|i|n,z=0,Complex(.9*i/w,.9*j/h);while n<=m&&( z-c).abs<=2;z=z*z+c;n+=1 end;print [10+n*15,0,rand*99].pack("C*")}}'|display #by Michael Neumann AFAICT