ALT Linux Community general discussions
 help / color / mirror / Atom feed
* Re: [Comm] find ... -exec и выходные потоки
@ 2005-09-26 22:48 Dmitry V. Levin
  0 siblings, 0 replies; only message in thread
From: Dmitry V. Levin @ 2005-09-26 22:48 UTC (permalink / raw)
  To: ALT Linux general discussion list

[-- Attachment #1: Type: text/plain, Size: 1043 bytes --]

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

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2005-09-26 22:48 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-09-26 22:48 [Comm] find ... -exec и выходные потоки Dmitry V. Levin

ALT Linux Community general discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://lore.altlinux.org/community/0 community/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 community community/ http://lore.altlinux.org/community \
		mandrake-russian@linuxteam.iplabs.ru community@lists.altlinux.org community@lists.altlinux.ru community@lists.altlinux.com
	public-inbox-index community

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://lore.altlinux.org/org.altlinux.lists.community


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git