Unable to pass variable filepath
Posted: 2016-04-22T10:19:20-07:00
I'm trying to pass a filepath from a variable as following
and for some reason if a filename contains spaces im gettings following output:
whereas when following command works fine:
it seems like when passing a variable as input filename it is getting splitted by space sign ignoring escape symbols
Code: Select all
convert -quality 100 -density 500 $FILE[$PAGES] page.jpg
Code: Select all
convert.im6: unable to open image `/home/mshepelev/Test/NEW\': No such file or directory @ error/blob.c/OpenBlob/2638.
convert.im6: no decode delegate for this image format `/home/mshepelev/Test/NEW\' @ error/constitute.c/ReadImage/544.
convert.im6: unable to open image `Cutting\': No such file or directory @ error/blob.c/OpenBlob/2638.
convert.im6: no decode delegate for this image format `Cutting\' @ error/constitute.c/ReadImage/544.
convert.im6: unable to open image `Edge\': No such file or directory @ error/blob.c/OpenBlob/2638.
convert.im6: no decode delegate for this image format `Edge\' @ error/constitute.c/ReadImage/544.
convert.im6: unable to open image `Upper-Intermediate\': No such file or directory @ error/blob.c/OpenBlob/2638.
convert.im6: no decode delegate for this image format `Upper-Intermediate\' @ error/constitute.c/ReadImage/544.
convert.im6: unable to open image `TB.pdf': No such file or directory @ error/blob.c/OpenBlob/2638.
convert.im6: no decode delegate for this image format `TB.pdf' @ error/constitute.c/ReadImage/544.
convert.im6: no images defined `page.jpg' @ error/convert.c/ConvertImageCommand/3044.
Code: Select all
convert /home/mshepelev/Test/NEW\ Cutting\ Edge\ Upper-Intermediate\ TB.pdf test.jpg