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
  • You can use trap so that the file .mutex is deleted on exit i.e: trap 'rm -f /tmp/proc3.signature.mutex' EXIT. Commented Oct 30, 2017 at 15:04
  • 1
    Have core.sh start the other scripts as background jobs, then use wait to wait for them to finish. No need for lock files (these aren't mutexes). Commented Oct 30, 2017 at 15:46
  • Why not simply loop and check if proc file with index less than scripts current one exists in tmp directory ? Commented May 17, 2019 at 0:23