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