help scripting bash
John H. Robinson, IV
jhriv at ucsd.edu
Tue May 31 11:45:07 PDT 2005
m ike wrote:
> convert -draw "line 10,10,20,20" text.jpg out.jpg
> draws a line on the image from 10,10 to 20,20
> so does this:
> g="line 10,10,20,20"
> convert -draw "$g" text.jpg out.jpg
> but this chokes:
> g='-draw "line 10,10,20,20"'
> echo $g
> convert $g text.jpg out.jpg
> appearantly convert is seeing "line 10,10,20,20" as two
> arguments, divided at the space.
> I'm at a loss. any ideas?
Use a better shell:
% g=(-draw "line 10,10,20,20"); convert -fill black $g mushroom.jpg X:-
That makes a pretty diagonal line, just as you expect.
More information about the KPLUG-List