mirror of
https://github.com/cheat/cheat.git
synced 2024-12-24 05:29:44 +01:00
Lock file
This commit is contained in:
parent
b3a93bc128
commit
f63406bc3e
@ -22,3 +22,6 @@ set +x
|
|||||||
# Retrieve N-th piped command exit status
|
# Retrieve N-th piped command exit status
|
||||||
printf 'foo' | fgrep 'foo' | sed 's/foo/bar/'
|
printf 'foo' | fgrep 'foo' | sed 's/foo/bar/'
|
||||||
echo ${PIPESTATUS[0]} # replace 0 with N
|
echo ${PIPESTATUS[0]} # replace 0 with N
|
||||||
|
|
||||||
|
# Lock file:
|
||||||
|
( set -o noclobber; echo > my.lock ) || echo 'Failed to create lock file'
|
||||||
|
Loading…
Reference in New Issue
Block a user