DO /P ... is this possible ... ?

  • This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.
So I guess the answer tp my original question is "yes". And getting it to work is a matter of doubling up some %s.
v:\ipreg\country> do x in /p ( do i=1 to 3 ( echo %%@eval[%%i**2]) ) ( echo %x foo )
1 foo
4 foo
9 foo
The same goes for Scott's example.
v:\ipreg\country> echo %@execstr[do i=1 to 5 (echos ` `%%i)]
 1 2 3 4 5
This is what I wanted to do in the first place. And it works!
v:\ipreg\country> do line in /p (do l in /p grep RU ipcountry.txt (echo %%@eval[0x%%@word[1,%%l]-0x%%@word[0,%%l]+1])) (set /a /q RUSUM+=%line)

v:\ipreg\country> echo %rusum