Right, yea, it was all a mistake I made and I thought the parenthesis were the culprits... Thanks anyway!!!
Yakir Gagnon The Queensland Brain Institute (Building #79) The University of Queensland Brisbane QLD 4072 Australia cell +61 (0)424 393 332 work +61 (0)733 654 089 On Sun, May 17, 2015 at 8:48 AM, andrew cooke <and...@acooke.org> wrote: > just playing around, it seems to me like julia is escaping with slashes. > i don't have imagmagick installed, but with echo it woks as expected: > > julia> run(`echo \(`) > ( > > julia> run(`echo \\(`) > \( > > julia> ^D > andrew@netbook:~> echo ( > bash: syntax error near unexpected token `newline' > andrew@netbook:~> echo \( > ( > andrew@netbook:~> echo \\( > bash: syntax error near unexpected token `(' > andrew@netbook:~> echo \\\( > \( > > the two julia commands give results equivalent to `\(` and `\\\(` in bash. > > > > > On Friday, 15 May 2015 00:41:24 UTC-3, Yakir Gagnon wrote: >> >> >> >> I'm trying to run an external imagemagick command. As such, it needs to >> include some escaped parenthesis. In shell it would look like this: >> >> convert img.png \( -clone 0 -crop 450x+450+0 -dither None -remap >> colormap1.png \) \( -clone 0 -crop 450x+951+0 -dither None -remap >> colormap2.png \) -delete 0 z%d.png >> >> But when I build something like this in julia: >> >> cmd = `convert $fname ( -clone 0 -crop wx+$(w+1)+0 -dither None -remap >> colormap1.png ) ( -clone 0 -crop 450x+$(sz[1]-w+1)+0 -dither None -remap >> colormap2.png ) -delete 0 z%d.png` >> >> the parenthesis don't get escaped (as they should be). >> >> This is not the first time I've gone crazy over this issue. Any ideas? >> >