howandsen 最近的时间轴更新
howandsen

howandsen

V2EX 第 235654 号会员,加入于 2017-06-15 14:44:13 +08:00
howandsen 最近回复了
2020-10-27 23:16:41 +08:00
回复了 Chuizi997 创建的主题 Linux shell 脚本求教
#!/bin/bash
#
# vim:ft=sh

############### Variables ###############

############### Functions ###############

############### Main Part ###############

f=$(mktemp XXXXX)

I_am_5(){
sleep 3
rm $f
}

I_am_4(){
while :
do
[ ! -f "$f" ] && return
echo counting...
sleep 1
done
}

I_am_5 &

I_am_4
https://alz.ee
十年左右
关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   1020 人在线   最高记录 6543   ·     Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 13ms · UTC 19:41 · PVG 03:41 · LAX 12:41 · JFK 15:41
Developed with CodeLauncher
♥ Do have faith in what you're doing.