Skip to content

Instantly share code, notes, and snippets.

@seletskiy
Last active August 29, 2015 14:15
Show Gist options
  • Select an option

  • Save seletskiy/c7f608da226b16d04e46 to your computer and use it in GitHub Desktop.

Select an option

Save seletskiy/c7f608da226b16d04e46 to your computer and use it in GitHub Desktop.
flock without file
#!/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