
@echo off & setlocal EnableDelayedExpansion
set j=0
for /f "delims="禅饥则肢轿"" %%i in (a.txt) do (
set /贺棚a j+=1
set con!j!=%%i
call set a=%%con!j!%%
echo !a!
)
pause
@echo off
setlocal enabledelayed expansion
set n=0
for /亮嫌f "敬唤手tokens=* delims=" %%i in (a.txt) do (
set /a n+=1
set !n!=%%i
)
变量全部给了行号
不包括链雀空行
例如
@echo off&setlocal
set n=0
for /昌返配f "耐指delims="世闹 %%i in (a.txt) do (
set/a n+=1 &call set f%%n%%=%%i )
call set aa=%%n%%
for /L %%j in (1,1,%aa%) do (call echo f%%j=%%f%%j%% )
pause