On Mon, Sep 26, 2005 at 03:15:10PM +0300, spider wrote: [...] > строка > > $ find -name 'foo-*.ppm' -exec ppmtopgm {} '>' {}.pgm \; > > вместо того, чтобы обработать все файлы каталога > порождает пустой файл {}.pgm. > > Как всетаки правильно запускать команды с потоками через > find -exec? Пожалуйста, прочтите документацию, там описан ваш случай: $ man find |colcrt |sed -ne '/^EXAMPLES/,/^E/ p' |sed -ne '/{}/,/\.$/ p' find . -type f -exec file '{}' \; Runs `file' on every file in or below the current directory. Notice that the braces are enclosed in single quote marks to protect them from interpretation as shell script punctuation. The semicolon is simi- larly protected by the use of a backslash, though ';' could have been used in that case also. P.S. В старых версиях пакета findutils этого примера нет. -- ldv