O GNU sort
e o xargs
podem fazer o truque
printf '%sprintf '%sprintf '%sprintf '%sprintf '%sprintf '%s%pre%' ullman*.pbm | xargs -0 printf '%s\n'
ullman-000.pbm
ullman-001.pbm
ullman-098.pbm
ullman-099.pbm
ullman-1000.pbm
..
..
' ullman*.pbm | sort -z -k2,2n -t'-' | xargs -0 printf '%s\n'
ullman-000.pbm
ullman-001.pbm
ullman-098.pbm
ullman-099.pbm
ullman-100.pbm
ullman-1000.pbm
...
' ullman*.pbm | sort -z -k2,2n -t'-' | xargs -0 convert
' ullman*.pbm | xargs -0 printf '%s\n'
ullman-000.pbm
ullman-001.pbm
ullman-098.pbm
ullman-099.pbm
ullman-1000.pbm
..
..
' ullman*.pbm | sort -z -k2,2n -t'-' | xargs -0 printf '%s\n'
ullman-000.pbm
ullman-001.pbm
ullman-098.pbm
ullman-099.pbm
ullman-100.pbm
ullman-1000.pbm
...
' ullman*.pbm | sort -z -k2,2n -t'-' | xargs -0 convert
Primeiro, verifique se isso funciona listando os arquivos sem chamar convert
Considerando que
%pre%