Reply-To: In-Reply-To: <4337E64E.6040008@lsi.bas-net.by> X-fingerprint: 9658 398D 181B 1200 8FC5 26B8 F6F8 846B C1E2 3429 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