wh1234567 当前离线
上尉
TOP
DAIC 当前离线
中将
powershell -c "foreach ($i in $(gc 11.txt)) {$n++; \"$n-\" + $i}" > 22.txt复制代码
gawk "{print NR\"-\"$0}" 11.txt > 22.txt复制代码
sed = 11.txt | sed "N;s/\n/-/" > 22.txt复制代码
jingyu9575 当前离线
列兵
@echo off set i=1 >22.txt (for /f "delims=" %%s in (11.txt) do ( setlocal enabledelayedexpansion <nul set /p "_=!i!" setlocal disabledelayedexpansion <nul set /p "_=-%%s" echo, set /a i+=1 ))复制代码
findstr /N ".*" 11.txt > 22.txt复制代码