Problem with scripting

Florian Diesch diesch at spamfence.net
Tue Aug 1 16:04:54 UTC 2006


Ouattara Oumar Aziz <wattazoum at gmail.com> wrote:

> I am doing a little script and I am getting a problem concerning file
> name with space.
>
> $ for file in `ls -1 -b *.jpg`; do convert $file -resize 640x480
> resz_$file; done
> convert: unable to open file `photo\': Aucun fichier ou répertoire de
> ce type.

This works even with line breaks in your filenames:

 find *.jpg -print0 |xargs -0 convert -resize 640x480




   Florian
-- 
<http://www.florian-diesch.de/>




More information about the ubuntu-users mailing list