返回列表 发帖
@echo off
set /p a=<2.txt
for /f %%I in (2.txt) do (
    set b=%%I
)
echo %a%%b%COPY

TOP

python
f=open("a.txt","r")
txt=f.readlines()
f.close()
l=txt[0].rstrip()+txt[-1]
print(l)COPY

TOP

@echo off
setlocal enabledelayedexpansion
for /f "delims=" %%i in (pjfile.txt) do (
if not defined firstrow (set firstrow=%%i) else (set lastrow=%%i)
)
echo !firstrow!!lastrow!COPY

TOP

返回列表