最笨的方法- @echo off
-
- for /f "tokens=1-6" %%i in (a.txt) do (
-
- if not defined .%%i (
- set /a .%%i = 1
- ) else (
- set /a .%%i = .%%i + 1
- )
-
- if not defined .%%j (
- set /a .%%j = 1
- ) else (
- set /a .%%j = .%%j + 1
- )
-
- if not defined .%%k (
- set /a .%%k = 1
- ) else (
- set /a .%%k = .%%k + 1
- )
-
- if not defined .%%l (
- set /a .%%l = 1
- ) else (
- set /a .%%l = .%%l + 1
- )
-
- if not defined .%%m (
- set /a .%%m = 1
- ) else (
- set /a .%%m = .%%m + 1
- )
-
- if not defined .%%n (
- set /a .%%n = 1
- ) else (
- set /a .%%n = .%%n + 1
- )
- )
- set .
- pause
复制代码
|