howandsen's recent timeline updates
howandsen

howandsen

V2EX member #235654, joined on 2017-06-15 14:44:13 +08:00
howandsen's recent replies
Oct 27, 2020
Replied to a topic by 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
十年左右
About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   991 Online   Highest 6679   ·     Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 91ms · UTC 23:13 · PVG 07:13 · LAX 16:13 · JFK 19:13
♥ Do have faith in what you're doing.