xiaobat 当前离线
列兵
@echo off set yyy=bbs bathome.net echo %yyy% for /f "tokens=1" %%i in ("%yyy%") do echo %%i (for /f "tokens=1 delims=." %%i in ("%yyy%") do echo %%i) >1.txt for /f "tokens=2" %%i in (1.txt) do echo %%i for /f "delims=. tokens=2" %%i in ("%yyy%") do echo %%i pause复制代码
TOP
@echo off cls for /f "tokens=1-3" %%i in (test.txt) do echo %%i %%j %%k for /f "tokens=2" %%i in (test.txt) do echo %%i pause复制代码
@echo off cls for /f "tokens=1-3" %%i in (f:\test.txt) do echo %%i %%j %%k for /f "tokens=2" %%i in (f:\test.txt) do echo %%i pause复制代码
@echo off set xxx=bbs buthome.net for /f "tokens=1-3 delims=. " %%i in ("%xxx%") do set s1=%%i && set s2=%%j && set s3=%%k echo %s1% echo %s2% echo %s3% pause>nul复制代码
mangci 当前离线
上等兵
for /l %i% in (1.1.100) do echo %i% for /l %i% in (1.2.99) do echo %i% 复制代码
for /l %%i in (1.1.100) echo %%i 复制代码
for /l %%i in (1.2.99) echo %%i 复制代码
@ echo off set "str=bbs bathome.net" echo %str% for %%i in (%str%) do echo %%i 复制代码
@ echo off for /f "tokens=*" %%i in (f:\test.txt) do echo %%i for /f "tokens=2" %%i in (f:\test.txt) do echo %%i pause复制代码
sotary 当前离线
二级士官
@echo off for /l %%a in (1,1,100) do echo %%a pause>nul for /l %%a in (1,2,99) do echo %%a pause>nul set str="bbs bathome.net" for /f "tokens=1 delims==. " %%a in (%str%) do echo %%a for /f "tokens=2 delims==. " %%a in (%str%) do echo %%a for /f "tokens=3 delims==. " %%a in (%str%) do echo %%a pause>nul for /f "tokens=1-3 delims==" %%a in (test.txt) do echo %%a pause>nul for /f "tokens=2 delims== " %%a in (test.txt) do echo %%a >nul @echo on复制代码
wangqi0077 当前离线
一级士官
@echo off color a for /f "delims=." %%i in (1.txt) do echo %%i echo _______________________________________ for /f "tokens=2" %%i in (1.txt) do echo %%i pause复制代码
zhenglj 当前离线
@echo off for /f "tokens=1 delims=. " %%a in ("bbs bathome.net") do echo %%a for /f "tokens=2 delims=. " %%b in ("bbs bathome.net") do echo %%b for /f "tokens=3 delims=. " %%c in ("bbs bathome.net") do echo %%c pause>nul复制代码
zhiyanzhai33 当前离线
@echo off echo 第一题 for /l %%i in (1,1,100) do echo %%i pause & cls echo 第二题 for /l %%i in (1,2,99) do echo %%i pause & cls echo 第三题 for /f "tokens=1-3 delims=. " %%i in ("bbs bathome.net") do ( echo %%i echo %%j echo %%k ) pause & cls echo 第四题①,这个可以不用for: type test.txt echo. & pause & cls echo 第四题② for /f "tokens=2" %%i in (test.txt) do echo %%i pause & cls复制代码
rivch 当前离线
@echo off for /f "delims=" %%i in (1.txt) do echo %%i pause>nul复制代码
@echo off for /f "tokens=2,5,8" %%i in (1.txt) do echo %%i pause>nul复制代码
@echo off set txt=bbs bathome.net for /f "tokens=1-3 delims=. " %%i in ("%txt%") do ( echo %%i echo %%j echo %%k ) pause>nul复制代码
vfcai 当前离线
@echo off for /l %%i in (1,1,100) echo %%i pause复制代码
@echo off for /l %%i in (1,2,99) echo %%i pause复制代码
@echo off for /f "delims=, "复制代码
awp628 当前离线
@echo off for /l %%i in (1,1,100) do echo.%%i复制代码