mirror of
https://github.com/Erreur32/cheat.git
synced 2025-01-03 11:32:17 +01:00
Lock file
This commit is contained in:
parent
b3a93bc128
commit
f63406bc3e
1 changed files with 3 additions and 0 deletions
|
@ -22,3 +22,6 @@ set +x
|
|||
# Retrieve N-th piped command exit status
|
||||
printf 'foo' | fgrep 'foo' | sed 's/foo/bar/'
|
||||
echo ${PIPESTATUS[0]} # replace 0 with N
|
||||
|
||||
# Lock file:
|
||||
( set -o noclobber; echo > my.lock ) || echo 'Failed to create lock file'
|
||||
|
|
Loading…
Reference in a new issue