ping测脚本

2021-05-17 15:25:45 浏览数 (1)

#!/bin/bash

number=$3

for i in $(seq $number)

do

time=`date %Y-%m-%d-%H-%M-%S`

ping -c 3 $1 | awk ' { printf ("%s ", $0)} END {printf ("n") } '> $time.txt

sleep $2

done

0 人点赞