Use flock to Ensure Only One Instance of a Shell Script Is Running

References:

  • Unix manual flock(1)
One clap, two clap, three clap, forty?

By clapping more or less, you can signal to us which stories really stand out.