![]() |
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-11-11 08:23 |
47,815 topics / 349,930 posts / today 0 new / 48,291 members |
| DOS批处理 & 脚本技术(批处理室) » {Solved} How to compare file contents - for comparing MAC addresses |
| Printable Version 4,372 / 22 |
| Floor16 youxi01 | Posted 2007-03-11 04:43 |
| 高级用户 Posts 247 Credits 846 From 湖南==》广东 | |
|
To: CCWan
Brother, the command findstr /v /g:b.txt a.txt >1.txt seems to need to be changed to findstr /v /g:b.txt a.txt >>1.txt, which is more reasonable, right? |
|
| Floor17 ccwan | Posted 2007-03-11 04:46 |
| 金牌会员 Posts 1,160 Credits 2,725 From 河北廊坊 | |
|
re youxi01
There is no need for that because it compares the entire content of the text at once, unlike for which loops sequentially. So even if there are many differences, it will all be output. This is also what I found after testing. Brother, you can give it a try. |
|
| Floor18 youxi01 | Posted 2007-03-11 05:04 |
| 高级用户 Posts 247 Credits 846 From 湖南==》广东 | |
|
Got it, understand, thanks.
|
|
| Floor19 lxmxn | Posted 2007-03-11 07:13 |
| 版主 Posts 4,938 Credits 11,386 | |
Originally posted by chainliq at 2007-3-10 09:39: When I first wrote it, the test was correct. Maybe you changed the contents of your a.txt and b.txt files, so it led to the "no response when running" you mentioned. The code has been updated, try again? |
|
| Floor20 chainliq | Posted 2007-03-13 04:26 |
| 高级用户 Posts 244 Credits 635 From 广西贵港 | |
|
Well, it's all right... Hehe``This is mainly to prevent ARP``In this case,``I'll re-collect the MACs of the following machines, and after comparison, I'll know which one is the culprit``,``Hehe``, everyone's methods are very good``Hehe``Learning in the process``
[ Last edited by chainliq on 2007-3-13 at 04:28 AM ] |
|
| Floor21 SunRiseBoy | Posted 2007-06-29 00:47 |
| 初级用户 Posts 20 Credits 38 | |
|
The design of the landlord's question is problematic:
If I am one of the macs, originally using 254 for the IP, I change to 100 and no other mac is using the 254 IP anymore, how do you detect me? It should be more reasonable to first judge the front and back macs and then see if the IP changes to report the MAC! Although I am very naive and can't understand some commands of the experts upstairs, I think the idea of the LZ is indeed problematic! [ Last edited by SunRiseBoy on 2007-6-29 at 12:57 AM ] |
|
| Floor22 ccwan | Posted 2007-06-29 08:31 |
| 金牌会员 Posts 1,160 Credits 2,725 From 河北廊坊 | |
|
Everyone's code starts from comparing the differences between two texts, and I believe the LZ means the same.
|
|
| Floor23 skystar65 | Posted 2009-01-05 04:21 |
| 初级用户 Posts 12 Credits 27 | |
Originally posted by ccwan at 2007-3-11 03:48 AM: So powerful! I spent an entire night writing a batch script and couldn't get it done The version master solved it with one line of code... |
|
| Prev 1 2 |
|
[ Contact the Union admin team -
中国DOS联盟 -
Standard version ] Sponsored by ifanr Inc | © 2001–2023 |