shell隧道获取 ping 命令返回结果
#!/bin/sh
mkfifo tmpfile
exec 6<>tmpfile
ping 192.168.6.77>&6 &
i=0
while [ $i -le 10 ]
do
read a<&6
date
# echo $a
i=`expr $i + 1`
done
exec 6>&-
rm tmpfile
#!/bin/sh
mkfifo tmpfile
exec 6<>tmpfile
ping 192.168.6.77>&6 &
i=0
while [ $i -le 10 ]
do
read a<&6
date
# echo $a
i=`expr $i + 1`
done
exec 6>&-
rm tmpfile
暂无评论
2024-05-17
2024-05-17
2024-05-17
2024-05-17
2024-05-17
2024-05-17
2024-05-17
2024-05-17
2024-05-17
2024-05-17
2024-05-17
2024-05-17
2024-05-17
2024-05-17
2024-05-17
2024-05-17
2024-05-17
2024-05-17
2024-05-17
2024-05-17
2024-05-17
2024-05-17
2024-05-17
2024-05-17
2024-05-17
2024-05-17
2024-05-17
2024-05-17
2024-05-17