Getting error using convert with multiple line script

Discuss digital image processing techniques and algorithms. We encourage its application to ImageMagick but you can discuss any software solutions here.
Post Reply
jensen31
Posts: 8
Joined: 2016-01-01T16:15:43-07:00
Authentication code: 1151

Getting error using convert with multiple line script

Post by jensen31 » 2019-01-29T04:35:45-07:00

Hi everybody.

in my script test.sh I have the following code:
convert -background lightblue -fill blue -font Helvetica -size 1320x140 \
caption:'This text is resized to best fill the space given.' \
/skripte/imgRender/test/caption_filled.gif

Running the script from file I get this errors:

root@debian02:~# /skripte/imgRender/test/test.sh
' @ error/convert.c/ConvertImageCommand/3210.
/skripte/imgRender/test/test.sh: Zeile 2: caption:This text is resized to best fill the space given.: Command not found.
/skripte/imgRender/test/test.sh: Zeile 3: /skripte/imgRender/test/caption_filled.gif: File or directory not found.

I always have problems with scripts using multiple lines. Important: If I copy the code directly into command line (putty) it just works fine.

Could you help me out please? Seems like beginner thing...
Thank you and have a nice day.
Jens

jensen31
Posts: 8
Joined: 2016-01-01T16:15:43-07:00
Authentication code: 1151

Re: Getting error using convert with multiple line script

Post by jensen31 » 2019-01-29T05:12:25-07:00

Update: I found the error. It was all up to I changed default editor to notepad++. So there was a windows line break into sh file. Now all is good. Thank you.

Best regards
Jens

Post Reply