aboutsummaryrefslogtreecommitdiff
path: root/README.markdown
blob: 9ffc9bcbf18193eba79e0be5111b9d3101864174 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
Lock
====

This program creates a lock directory to ensure two programs do no simulaneously execute

example GIF:

![example-footage](https://github.com/mutantturkey/lock/raw/master/lock.gif)


example text:

    calvin@barnabas:~/lock$ lock p
    calvin@barnabas:~/lock$ lock p && echo 'UNLOCKED' &
    [2] 22844
    calvin@barnabas:~/lock$ rmdir p
    * two seconds later *
    calvin@barnabas:~/lock$ 
    UNLOCKED
    [2]-  Done                    lock p && echo -e '\nUNLOCKED\n'
    calvin@barnabas:~/lock$