![]() |
China DOS Union-- Unite DOS · Advance DOS · Grow DOS --Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum |
| Guest | Log in | Register | Members | Search | China DOS Union |
|
中国DOS联盟论坛 The time now is 2026-08-09 12:58 |
47,811 topics / 349,895 posts / today 0 new / 48,254 members |
| DOS批处理 & 脚本技术(批处理室) » Problems with the ping command? |
| Printable Version 2,767 / 17 |
| Floor1 shellfj | Posted 2007-06-27 16:35 |
| 新手上路 Posts 2 Credits 6 | |
|
Ping www.163.com, I want to know the result of whether it is pinged successfully. How to know this structure in batch commands?
|
|
| Floor2 shellfj | Posted 2007-06-27 16:56 |
| 新手上路 Posts 2 Credits 6 | |
Originally posted by shellfj at 2007-6-27 04:35 PM: Just registered, first post, hope everyone supports. |
|
| Floor3 lxmxn | Posted 2007-06-28 05:24 |
| 版主 Posts 4,938 Credits 11,386 | |
|
```
ping www.163.com >nul 2>nul && echo OK || echo NO ``` |
|
| Floor4 woainiphj | Posted 2007-06-28 17:28 |
| 初级用户 Posts 26 Credits 55 | |
|
I can't understand ah what are you guys talking about
|
|
| Floor5 lxmxn | Posted 2007-06-28 18:05 |
| 版主 Posts 4,938 Credits 11,386 | |
Originally posted by woainiphj at 2007-6-28 17:28: Discussing whether the ping command was executed successfully. |
|
| Floor6 duanml | Posted 2007-06-28 18:49 |
| 中级用户 Posts 112 Credits 231 | |
|
?
In the past, I seemed to always use errorlevel to judge~ |
|
| Floor7 odian | Posted 2007-07-28 18:59 |
| 新手上路 Posts 8 Credits 16 | |
| Floor8 hxmupdata | Posted 2007-07-30 01:46 |
| 初级用户 Posts 39 Credits 76 | |
|
ping www.163.com >nul 2>nul && echo OK || echo NO
Very simple, oh. Once used, you won't forget. |
|
| Floor9 ados | Posted 2007-07-30 08:33 |
| 新手上路 Posts 5 Credits 10 | |
|
Well, simple and easy-to-use command line
|
|
| Floor10 shuiyin313 | Posted 2008-03-18 23:09 |
| 初级用户 Posts 85 Credits 177 | |
|
I'm understanding the usage of ping, so I searched.
Found ping www.163.com >nul 2>nul && echo OK || echo NO Displaying the results with OK and NO swapped positions is different......... It should be the same. When ping fails Reply from 192.168.0.1: Destination net unreachable It will also display OK........ |
|
| Floor11 lfopt | Posted 2008-03-19 23:47 |
| 初级用户 Posts 34 Credits 71 | |
|
It seems like there is nothing at all
|
|
| Floor12 shuiyin313 | Posted 2008-03-24 23:59 |
| 初级用户 Posts 85 Credits 177 | |
Originally posted by lxmxn at 2007-6-28 06:05 PM: TO lxmxn Can you help answer the question on floor 10? THS! |
|
| Floor13 ty03184015 | Posted 2008-03-26 13:49 |
| 初级用户 Posts 18 Credits 36 | |
|
Got it. Although I still can't understand some of these commands now, keep trying, keep trying.
|
|
| Floor14 hainanmm | Posted 2008-03-27 02:14 |
| 初级用户 Posts 12 Credits 24 | |
|
Can you explain this command? I don't understand it. NUL is the null device.
2>NUL?? I don't understand. 2>nul && echo OK || echo NO I can't understand either. Experts, please explain. Let's learn bit by bit. |
|
| Floor15 kongbufenzi | Posted 2008-03-27 10:51 |
| 新手上路 Posts 2 Credits 4 | |
|
If the ping is successful, what actions can be taken?
|
|
| 1 2 Next |
|
[ Contact the Union admin team -
中国DOS联盟 -
Standard version ] Sponsored by ifanr Inc | © 2001–2023 |