Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

3
  • Could you use a subshell instead of exec there? -exec sh -c '(cmd1; cmd2;)' find-sh {} +? Commented Oct 2, 2013 at 19:13
  • So if I understand you correctly, the find-sh {} are arguments to the sh -c '...' command, right? Commented Oct 2, 2013 at 19:22
  • @slm, find will call /bin/sh with as arguments ("sh", "-c", "...", "find-sh", "./file1", "./file2"...). And inside ..., that maps (the shells maps that) to $0` being "find-sh", and the positional parameters ($1, $2... which you could say are the arguments to the inline script) being ./file1, ./file2. Commented Oct 2, 2013 at 19:45