Tugger the SLUGger!SLUG Mailing List Archives

[SLUG] Find question


Hi Guys & Gals,

just got a question on multiple execs in find
basically i want to copy files that contain a certain
string to a common directory.
This is how I did it:

find . -name '*' -exec grep 'HELLO' {} \; -exec cp {}
send \;

I was surprised it worked. Could it be that the second
exec executed because the first i.e. grep returned 0?

Ta!

Find local movie times and trailers on Yahoo! Movies.
http://au.movies.yahoo.com