[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH OSSTEST v7 01/15] TestSupport: Add helper to fetch a URL on a host
Ian Campbell writes ("Re: [PATCH OSSTEST v7 01/15] TestSupport: Add helper to fetch a URL on a host"): > On Mon, 2015-07-06 at 15:48 +0100, Ian Jackson wrote: > > Ian Campbell writes ("[PATCH OSSTEST v7 01/15] TestSupport: Add helper to > > fetch a URL on a host"): > > > + $useproxy wget --progress=dot:mega -O \"$path\" \"$url\" ... > > \Q may be of some help. > > Really? I thought that escaped things at the Perl level, is that > sufficient for the shell stuff within the Perl too? If you wrote + target_cmd_root($ho, <<END, $timeo); + $useproxy wget --progress=dot:mega -O \Q$path\E \Q$url\E and $url contained http://chars $"'\ considered harmful.iso then target_cmd_root would get http_proxy=something wget --progress=dot:mega -O \/some\/path \ http\:\/\/chars\ \$\"\'\\\ considered\ harmful\.iso And: mariner:~> echo http\:\/\/chars\ \$\"\'\\\ considered\ harmful\.iso http://chars $"'\ considered harmful.iso mariner:~> But maybe this is too ugly, in which case you could use '' and some regexp like s/['\\]/'\\$&'/g (not tested). Ian. _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |