One instance at a time with PID file in Bash

Often times, I only want a script to run one instance at a time. For example, if the the script is copying files, or rsync’ing between systems, it can be disastrous to have two instances running concurrently, and this situation is definitely possible if you run the script from cron. I figured out a simple … Continue reading One instance at a time with PID file in Bash