我想 ping 一堆位置,但不是同时,这样它们就不会超时。
输入例如:ping google.com -n 10 | grep Minimum >> output.txt
这将使输出:Minimum = 29ms, Maximum = 46ms, Average = 33ms
但是它前面有额外的空格,我不知道如何切断,当它输出到 txt 文件时,它不会换行。我想要做的是制作它,这样我就可以复制和粘贴输入并在之前完成后 ping 一堆地方,并将其记录在 .txt 文件中并对它们进行编号,使其看起来像:
Server 1: Minimum = 29ms, Maximum = 46ms, Average = 33ms
Server 2: Minimum = 29ms, Maximum = 46ms, Average = 33ms
Server 3: Minimum = 29ms, Maximum = 46ms, Average = 33ms
Server 4: Minimum = 29ms, Maximum = 46ms, Average = 33ms