From: "Collins, Justin" Date: 2006-10-06T18:37:12+09:00 Subject: Re: script arg with doble quote ------_=_NextPart_001_01C6E92A.FEC7CDF8 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Une b=E9vue wrote: > Paul Lutus wrote: > >> But you've just posted the solution -- single quote the argument. > > i can't the double quotes are eated by the shell and if i add the = single > quote, it's to late >> When you post a problem and seek a solution, please make sure to = state the >> problem clearly, like this: >> >> 1. I wanted this: ________________________ > > transform a unix path into an url provided the path is under the = apache > server root. > > /path/to/"Hello\ world!"/ > >> 2, But instead, I got this: _________________________ > > in case the path contains double quotes, the double quotes are eated = by > the shell and or finder (mac os x). then i got : > > /path/to/Hello\ world!/ > >> 3. Here is how (2) differs from (1): _____________________ > > the " vanished. Why do you need the double quotes? If it's to pass the path back to the = shell (or other, similar place), you can put quotes around the entire = argument to the same effect. For example: path =3D ARGV[0] system("ls -l '#{ARGV[0]}'") #Using single quotes avoids having to = escape them Does that help? -Justin ------_=_NextPart_001_01C6E92A.FEC7CDF8--