Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Posting-Version: version B 2.10.2 8/7/84; site ucbvax.ARPA
Path: utzoo!linus!decvax!ucbvax!wall
From: wall@ucbvax.ARPA (Steve Wall)
Newsgroups: net.bugs.4bsd,net.unix
Subject: Solution for find(1) in 4.2BSD
Message-ID: <2389@ucbvax.ARPA>
Date: Sat, 6-Oct-84 03:34:11 EDT
Article-I.D.: ucbvax.2389
Posted: Sat Oct  6 03:34:11 1984
Date-Received: Sat, 6-Oct-84 07:18:48 EDT
Distribution: net
Organization: University of California at Berkeley
Lines: 44


Apparently what I thought was a bug in find(1) was a syntax error
on my part in giving the command, although the error was pretty
obscure. find(1) **MUST** have a space between the "{}" and the
escaped ";" in order to work correctly. Some people suggested putting 
quotes around the {}, but that still doesn't work unless you have a 
space between the {} and the escaped ";".  This is ***NOT*** made clear 
on the manual page. Argh!

Here's a script with a few responses/suggestions and what they
produce:

===========================================
arpa % ls -RF
1/	2/

1:
file_find

2:
file_find

>	Try putting the {} in quotes so the shell doesn't expand it.

arpa % find . -name file_find -exec ls -l "{}"\;	-->[NOTE: NO SPACE!]
find: incomplete statement

>	don't combine the {} and the \; in the same token.
>
>		find ...... -exec ls -l {} \;
>
>	should do what you want.

arpa % find . -name file_find -exec ls -l {} \;  --->[NOTE: THE SPACE!]

-rw-r--r--  1 wall            0 Oct  4 06:46 ./1/file_find
-rw-r--r--  1 wall            0 Oct  4 06:46 ./2/file_find

=============================================
Thanks for the responses,

Steve Wall
wall@ucbarpa
..!ucbvax!wall