Computing.Net > Forums > Unix > shell function in find -exec

shell function in find -exec

Reply to Message Icon

Original Message
Name: sreenip
Date: February 15, 2001 at 05:25:38 Pacific
Subject: shell function in find -exec
Comment:

I need to use a function in the find command to do some process on the file. I'm trying:

funcname(){ ... }
...
find ./ -name "*" -exec funcname {} \;

But somehow this is not working. I don't want to have a separate script for whatever processing the function does. I want to have both the function and the find command in the same script.
When I execute a script just containing the function definition using ". scriptname" and execute the same find command at the command line it's working fine.

Is there anyway I can put both of them in the same script.

Thanks.


Report Offensive Message For Removal








Use following form to reply to current message:

   Name: From My Computing.Net Settings
 E-Mail: From My Computing.Net Settings

Subject: shell function in find -exec

Comments:

 


  Homepage URL (*): 
Homepage Title (*): 
         Image URL: 
 
Data Recovery Software




Have you ever used OpenOffice?

Yes, as my main suite.
Yes, occationally.
Yes, but only once.
No, never.


View Results

Poll Finishes In 5 Days.
Discuss in The Lounge