zhuchella
С помощью grep.exe:
Код:
@echo off
setlocal
for /f %%i in ('grep -c ".*" test.ini') do set /a "lines=%%i-3"
grep -m %lines% ".*" test.ini | 1>test.tmp more
move test.tmp test.ini
С помощью grep.exe:
Код:
@echo off
setlocal
for /f %%i in ('grep -c ".*" test.ini') do set /a "lines=%%i-3"
grep -m %lines% ".*" test.ini | 1>test.tmp more
move test.tmp test.ini