Last active
August 29, 2015 14:15
-
-
Save seletskiy/c7f608da226b16d04e46 to your computer and use it in GitHub Desktop.
flock without file
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| [ -n "$_LOCK" ] || _LOCK=x exec flock -n $0 $0 | |
| echo once | |
| sleep 5s |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment