1.-
- @echo off
- for /l %%i in (1,1,100) do echo %%i
- pause
复制代码 2.-
- @echo off
- for /l %%i in (1,2,99) do echo %%i
- pause
复制代码 3.-
- @echo off
- set a=bbs bathome.net
- for /f %%i in ("%a%") do echo %%i
- for /f "tokens=2 delims=+. " %%i in ("%a%") do echo %%i
- for /f "tokens=3 delims=+. " %%i in ("%a%") do echo %%i
- pause
复制代码 4.1-
- @echo off
- for /f "delims=" %%i in (f:\test.txt) do echo %%i
- pause
复制代码 4.2-
- @echo off
- for /f "tokens=2" %%i in (f:\test.txt) do echo %%i
- pause
复制代码
[ 本帖最后由 lzx 于 2010-11-3 01:48 编辑 ] |