
[已解決]批處理如何根據一個txt文本的行內容查找統計另一個txt文本相同行的行數最后由 pcl_test 于 -7-11 10:32a.txt
b.txtnclick="copycode($('code0'));">復制代碼
- 05 06 07 08 10 11
- 05 06 07 08 10 12
- 05 06 07 08 10 13
- 05 06 07 08 10 14
- 05 06 07 08 10 15
- 01 02 03 04 05 15
- 01 02 03 04 05 16
- 01 02 03 04 05 17
- 01 02 03 04 05 18
- 01 02 03 04 05 19
- 01 02 03 04 05 20
- 01 02 03 04 05 21
nclick="copycode($('code1'));">復制代碼
- 05 06 07 08 09
- 05 06 07 08 10
- 06 07 08 09 25
- 06 07 08 09 26
這個代碼怎么統計查找處理后的文本行數并添加到%%a讀取的那行數的后邊nclick="copycode($('code2'));">復制代碼
- @echo off
- for /f tokens=1-5 delims= %%a in (b.txt) do (
- set a=%%a
- set b=%%b
- set c=%%c
- set d=%%d
- set e=%%e
- setlocal enabledelayedexpansion
- echo !a! !b! !c! !d! !e!
- findstr /c:%%a a.txt|findstr /c:%%b|findstr /c:%%c|findstr /c:%%d|findstr /c:%%e>>次數.txt
- endlocal
- )
- pause

