while [ 1 ];do
date;ping ip -c 1
done
这个写在bat里是无法执行的吧.能否具体点呢
原帖由 "b.s.d" 发表:
我的是2003
[root@PT_LINUX boot]# while :;do ping -c 1 172.17.39.251|awk '/ttl=/'|sed "s/^/`date +%Y-%m-%d\|%T` /";sleep 1;done
2005-09-20|15:24:40 64 bytes from 172.17.39.251: icmp_seq=0 ttl=128 time=0.240 ms
2005-09-20|15:24:41 64 bytes from 172.17.39.251: icmp_seq=0 ttl=128 time=0.235 ms
2005-09-20|15:24:42 64 bytes from 172.17.39.251: icmp_seq=0 ttl=128 time=0.220 ms
2005-09-20|15:24:43 64 bytes from 172.17.39.251: icmp_seq=0 ttl=128 time=0.224 ms
2005-09-20|15:24:45 64 bytes from 172.17.39.251: icmp_seq=0 ttl=128 time=0.211 ms
2005-09-20|15:24:46 64 bytes from 172.17.39.251: icmp_seq=0 ttl=128 time=0.211 ms
2005-09-20|15:24:47 64 bytes from 172.17.39.251: icmp_seq=0 ttl=128 time=0.222 ms
2005-09-20|15:24:48 64 bytes from 172.17.39.251: icmp_seq=0 ttl=128 time=0.221 ms
2005-09-20|15:24:49 64 bytes from 172.17.39.251: icmp_seq=0 ttl=128 time=0.222 ms
[root@PT_LINUX boot]#
原帖由 AmoyOriole 于 2005-9-13 17:45 发表
@echo off
:START
date/t >;>; aa.txt
time/t >;>; aa.txt
ping 10.111.23.1 -n 10 >;>;aa.txt
goto START
稍微变通的方法,呵呵。
原帖由 archangle 于 2005-9-9 13:31 发表
我有一个笨办法
while [ 1 ];do
date;ping ip -c 1
done
欢迎光临 Chinaunix (http://bbs.chinaunix.net/) | Powered by Discuz! X3.2 |