1
0
mirror of https://github.com/cheat/cheat.git synced 2024-12-24 05:29:44 +01:00

Lock file

This commit is contained in:
Cedric Dufour 2015-09-04 11:09:39 +02:00
parent b3a93bc128
commit f63406bc3e

View File

@ -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'