Page 1 of 1

Getting error using convert with multiple line script

Posted: 2019-01-29T04:35:45-07:00
by jensen31
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

Re: Getting error using convert with multiple line script

Posted: 2019-01-29T05:12:25-07:00
by jensen31
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