flock's Examples

Used for managing file locks in shell scripts.

flock myfile.txt -c "echo 'Locked file'"