运维网's Archiver
论坛
›
Shell/Powershell
› shell flock-Biotech
liyeho
发表于 2018-8-21 11:23:41
shell flock-Biotech
#!/bin/sh
{
flock -n 3
[ $? -eq 1 ] && { echo fail; exit; }
echo $$
sleep 10
} 3>mylockfile
页:
[1]
查看完整版本:
shell flock-Biotech