中国DOS联盟论坛

China DOS Union

-- Unite DOS · Advance DOS · Grow DOS --
Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
Guest | Log in | Register | Members | Search | China DOS Union
中国DOS联盟论坛
The time now is 2026-10-01 15:30
47,813 topics / 349,918 posts / today 0 new / 48,279 members
DOS批处理 & 脚本技术(批处理室) » Seeking help on the use of the tokens parameter in the for command?
Printable Version  5,286 / 29
Floor16 leoson88 Posted 2007-03-14 00:05
初级用户 Posts 39 Credits 83
I used to be half-understanding, but after watching the detailed explanation, I fully understood~~
Floor17 vsda2008 Posted 2007-03-25 07:36
初级用户 Posts 15 Credits 34
Floor18 studythedos Posted 2007-03-30 00:31
初级用户 Posts 45 Credits 91
Originally, I also didn't understand what the * sign for tokens meant. I thought eol only removed the character that followed it. After listening to the explanation from user 6, I now understand. Hey, thanks!
Floor19 huahua0919 Posted 2007-12-03 10:58
银牌会员 Posts 780 Credits 1,608
I only feel it's right after I understand the document by myself and then look at this one
Floor20 gugewang Posted 2008-01-11 20:32
新手上路 Posts 6 Credits 12
It's really an "aha" moment, a sudden enlightenment~~~~~~~

Really thanks to the guidance of the expert~~~~~~~
Floor21 haiou327 Posted 2008-01-14 17:32
高级用户 Posts 348 Credits 713
Good tutorial!!!!!!!!!!!!!
Floor22 wangjmh Posted 2008-01-18 20:04
初级用户 Posts 26 Credits 63
I want to know there is a %j in it, and I can't find where this parameter is
Floor23 wangjmh Posted 2008-01-18 20:05
初级用户 Posts 26 Credits 63
My Q is 284292673, email is: wangjmh@126.com
Thanks
Floor24 haiou327 Posted 2008-01-19 19:35
高级用户 Posts 348 Credits 713
I'll top this good post first, otherwise it'll be submerged again
Floor25 h2thesun Posted 2008-03-03 23:48
初级用户 Posts 14 Credits 34
Not bad. I used to get confused when seeing piles of asterisk-number, number and other things. The explanation on the 6th floor is good. Add points.
Floor26 snzy342 Posted 2009-11-11 12:01
新手上路 Posts 5 Credits 4 From 湖北省襄樊市南漳县
for can take values of more than 26 variables, and it is taken according to the order of ASCII size, up to 31.
When starting from A, it can reach 31, which are "A to Z, [, \, ], ^, _"
When starting from a, it can reach 29, which are "a to z, {, |, }"
When starting from!, it can reach 31, which are "!, ", #, $, &, ', (, ), *, +,,, -,., /, 0 to 9, :, ;, <, =, >,?"
Floor27 mindayl Posted 2009-11-11 21:51
新手上路 Posts 1 Credits 1 From 北京
I've taken a look, and what's said on the 6th floor is very clear. Not bad!
Floor28 slw218856 Posted 2009-11-11 22:59
初级用户 Posts 75 Credits 133
for /f "tokens=2,* delims= " %%i in (a.txt) do echo %%i %%j for /f "tokens=2* delims= " %%i in (a.txt) do echo %%i %%j
Is there a difference between 2,* and 2*?
Floor29 weasel Posted 2009-11-12 00:23
初级用户 Posts 66 Credits 118
Study hard
Make progress every day
What the 6th floor said is good!
Floor30 flying008 Posted 2009-11-12 13:19
中级用户 Posts 103 Credits 245
Originally posted by slw218856 at 2009-11-11 22:59:
for /f "tokens=2,* delims= " %%i in (a.txt) do echo %%i %%j for /f "tokens=2* delims= " %%i in (a.txt) do echo %%i %%j
Is there a difference between 2,* and 2*?


Of course there is a difference. The help built into CMD explains it clearly.
Prev  1 2
[ Contact the Union admin team - 中国DOS联盟 - Standard version ]
Sponsored by ifanr Inc | © 2001–2023