8

How to prevent double escaping?

view full story
linux-howto

http://unix.stackexchange.com – I'm trying to put a bunch of images together into a pdf. I ran gm convert *.jpg out.pdf and it worked, but the images were not in the right order. I found that ls -v orders them correctly so then I tried gm convert `ls -v *.jpg` out.pdf, but that failed because the files have spaces in the names. So I checked the ls options and tried gm convert `ls -Qv *.jpg` out.pdf and gm convert `ls -bv *.jpg` out.pdf but both failed because, as far as I can tell, the file names got escaped twice (using \" in the first case, and \\ before space in the 2nd case). Why is this happening, and how can I get the (HowTos)