$cmd = 'ps -eaf | grep -c "\< '."$0".'\>"'; chomp($instances = `$cmd`); if($instances > 1) exit;
In reply to Re^2: Ensuring only one copy of a perl script is running at a time
by Anonymous Monk
in thread Ensuring only one copy of a perl script is running at a time
by eyepopslikeamosquito
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |