标签:fifo echo ++ shell seq bin temp exit --
#!/bin/bashtempfifo=$$.fifo
trap "exec 1000>&-;exec 1000<&-;exit 0" 2
mkfifo $tempfifo
exec 1000<>$tempfifo
rm -rf $tempfifo
for ((i=1; i<=8; i++))
do
echo >&1000
done
for i in seq 100
do
read -u1000
{
echo "-------------->"$i
echo >&1000
sleep 3
} &
done
wait
echo "done!!!!!"
标签:fifo echo ++ shell seq bin temp exit --
原文地址:http://blog.51cto.com/dihuo/2060743