slig36
slig36

Reputation: 185

ImageMagik doesnt convert in shell

I'm tring to apply an effect on a picture but my shell command return me an error but I don't see it. Someone see what's wrong ?

My command :

convert ( /var/www/folder/img.jpg -modulate 120,50,100 ) ( -size 980x650 -fill rgba(255,153,0,0.5) -draw "rectangle 0,0 980,650" ) -compose multiply /var/www/folder/f3-img.jpg ; 

The error

:syntax error near unexpected token `/var/www/folder/img.jpg'

Thanks for your help :)

Upvotes: 0

Views: 202

Answers (1)

user1284631
user1284631

Reputation: 4606

The brackets () are special commands in Bash command-line. They spawn a new shell when they are surrounding a command, or (credits to @pabouk) they signal a function definition. Neither is the intended case for you.

The bottom line is that brackets () have special meaning for the bash shell, so you need to escape brackets, prefixing them with a backslash, so that bash doesn't try to interpret them:

\( and \)

Upvotes: 2

Related Questions