Applying a script to all the files of the find command
ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
When you use a plus sign at the end of the -exec expression, it acts similarly to xargs, concatenating all the file names into as few runs as possible; as opposed to using a semicolon, which runs the command separately for each file found. See the find man page for details.
Your script/program must be able to handle the multiple inputs, of course.
Well without seeing the other scripts I would have thought it might be time to merge the 3 scripts to get done what you require.
Seeing where you need the filename I am not sure if any of the above would be correct (I could be well wrong here)
I would probably suggest a while loop getting input from the find and performing your tasks as based on post #8 what you have will only act on separate files.