ALT Linux Team development discussions
 help / color / mirror / Atom feed
* [devel] find retval
@ 2002-12-23 15:13 Alexey Tourbin
  2002-12-23 15:18 ` Dmitry V. Levin
  0 siblings, 1 reply; 6+ messages in thread
From: Alexey Tourbin @ 2002-12-23 15:13 UTC (permalink / raw)
  To: devel

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


$ find contrib -name CVS -o name 'Makefile*' -print0 | xargs -r0 %__rm -rf
find: paths must precede expression
Usage: find [path...] [expression]
$ RETVAL=$?
$ echo $RETVAL
0
$

OK/Cancel? :)

-- 
WBR, Alexey Tourbin
BIOZAK Ltd., Russia

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [devel] find retval
  2002-12-23 15:13 [devel] find retval Alexey Tourbin
@ 2002-12-23 15:18 ` Dmitry V. Levin
  2002-12-24 16:11   ` [devel] " Alexey Tourbin
  0 siblings, 1 reply; 6+ messages in thread
From: Dmitry V. Levin @ 2002-12-23 15:18 UTC (permalink / raw)
  To: ALT Devel discussion list

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

On Mon, Dec 23, 2002 at 06:13:54PM +0300, Alexey Tourbin wrote:
> 
> $ find contrib -name CVS -o name 'Makefile*' -print0 | xargs -r0 %__rm -rf
> find: paths must precede expression
> Usage: find [path...] [expression]
> $ RETVAL=$?
> $ echo $RETVAL
> 0
> $
> 
> OK/Cancel? :)

$ false |true; echo $?
0


--
ldv

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [devel] Re: find retval
  2002-12-23 15:18 ` Dmitry V. Levin
@ 2002-12-24 16:11   ` Alexey Tourbin
  2002-12-24 17:31     ` Dmitry V. Levin
  0 siblings, 1 reply; 6+ messages in thread
From: Alexey Tourbin @ 2002-12-24 16:11 UTC (permalink / raw)
  To: ALT Devel discussion list

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

On Mon, Dec 23, 2002 at 06:18:32PM +0300, Dmitry V. Levin wrote:
> > $ find contrib -name CVS -o name 'Makefile*' -print0 | xargs -r0 %__rm -rf
> > find: paths must precede expression
> > Usage: find [path...] [expression]
> > $ RETVAL=$?
> > $ echo $RETVAL
> > 0
> > $
> > 
> > OK/Cancel? :)
> 
> $ false |true; echo $?
> 0

Ещё один вопрос по find: хорошо ли, что две следующие команды работают
совершено по-разному?

find contrib     -name CVS -o -name 'Makefile*'
find contrib '(' -name CVS -o -name 'Makefile*' ')'



-- 
WBR, Alexey Tourbin
BIOZAK Ltd., Russia

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [devel] Re: find retval
  2002-12-24 16:11   ` [devel] " Alexey Tourbin
@ 2002-12-24 17:31     ` Dmitry V. Levin
  2002-12-24 17:40       ` Alexey Tourbin
  0 siblings, 1 reply; 6+ messages in thread
From: Dmitry V. Levin @ 2002-12-24 17:31 UTC (permalink / raw)
  To: ALT Devel discussion list

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

On Tue, Dec 24, 2002 at 07:11:04PM +0300, Alexey Tourbin wrote:
> Ещё один вопрос по find: хорошо ли, что две следующие команды работают
> совершено по-разному?
> 
> find contrib     -name CVS -o -name 'Makefile*'
> find contrib '(' -name CVS -o -name 'Makefile*' ')'

Что значит "по-разному"?


--
ldv

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [devel] Re: find retval
  2002-12-24 17:31     ` Dmitry V. Levin
@ 2002-12-24 17:40       ` Alexey Tourbin
  2002-12-24 17:57         ` Dmitry V. Levin
  0 siblings, 1 reply; 6+ messages in thread
From: Alexey Tourbin @ 2002-12-24 17:40 UTC (permalink / raw)
  To: ALT Devel discussion list

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

On Tue, Dec 24, 2002 at 08:31:28PM +0300, Dmitry V. Levin wrote:
> On Tue, Dec 24, 2002 at 07:11:04PM +0300, Alexey Tourbin wrote:
> > Ещё один вопрос по find: хорошо ли, что две следующие команды работают
> > совершено по-разному?
> > 
> > find contrib     -name CVS -o -name 'Makefile*'
> > find contrib '(' -name CVS -o -name 'Makefile*' ')'
> 
> Что значит "по-разному"?

Теперь уже и сам не понимаю. :(
Наткнулся на проблему c -print0.


[at@ungrund elinks-0.4.0]$ find contrib     -name CVS -o -name 'Makefile*' -print0
contrib/Makefilecontrib/Makefile.amcontrib/Makefile.in[at@ungrund elinks-0.4.0]$
[at@ungrund elinks-0.4.0]$ find contrib '(' -name CVS -o -name 'Makefile*' ')' -print0
contrib/CVScontrib/lua/CVScontrib/lua/lua/CVScontrib/conv/CVScontrib/conv/conv/CVScontrib/Makefilecontrib/Makefile.amcontrib/Makefile.in[at@ungrund elinks-0.4.0]$
[at@ungrund elinks-0.4.0]$


-- 
WBR, Alexey Tourbin
BIOZAK Ltd., Russia

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [devel] Re: find retval
  2002-12-24 17:40       ` Alexey Tourbin
@ 2002-12-24 17:57         ` Dmitry V. Levin
  0 siblings, 0 replies; 6+ messages in thread
From: Dmitry V. Levin @ 2002-12-24 17:57 UTC (permalink / raw)
  To: ALT Devel discussion list

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

On Tue, Dec 24, 2002 at 08:40:08PM +0300, Alexey Tourbin wrote:
> > > Ещё один вопрос по find: хорошо ли, что две следующие команды работают
> > > совершено по-разному?
> > > 
> > > find contrib     -name CVS -o -name 'Makefile*'
> > > find contrib '(' -name CVS -o -name 'Makefile*' ')'
> > 
> > Что значит "по-разному"?
> 
> Теперь уже и сам не понимаю. :(
> Наткнулся на проблему c -print0.
> 
> [at@ungrund elinks-0.4.0]$ find contrib     -name CVS -o -name 'Makefile*' -print0
> contrib/Makefilecontrib/Makefile.amcontrib/Makefile.in[at@ungrund elinks-0.4.0]$

Это выражение эквивалентно
$ find contrib -name CVS -o '(' -name 'Makefile*' -print0 ')'

> [at@ungrund elinks-0.4.0]$ find contrib '(' -name CVS -o -name 'Makefile*' ')' -print0
> contrib/CVScontrib/lua/CVScontrib/lua/lua/CVScontrib/conv/CVScontrib/conv/conv/CVScontrib/Makefilecontrib/Makefile.amcontrib/Makefile.in[at@ungrund elinks-0.4.0]$

Если все ещё непонятно, напишите мне лично, я расскажу. :)


--
ldv

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2002-12-24 17:57 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-12-23 15:13 [devel] find retval Alexey Tourbin
2002-12-23 15:18 ` Dmitry V. Levin
2002-12-24 16:11   ` [devel] " Alexey Tourbin
2002-12-24 17:31     ` Dmitry V. Levin
2002-12-24 17:40       ` Alexey Tourbin
2002-12-24 17:57         ` Dmitry V. Levin

ALT Linux Team development discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://lore.altlinux.org/devel/0 devel/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 devel devel/ http://lore.altlinux.org/devel \
		devel@altlinux.org devel@altlinux.ru devel@lists.altlinux.org devel@lists.altlinux.ru devel@linux.iplabs.ru mandrake-russian@linuxteam.iplabs.ru sisyphus@linuxteam.iplabs.ru
	public-inbox-index devel

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


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