Solved

how to parse a series of numbers in a file with DOS shell

Posted on 2011-02-18
873 Views
Have a file with integers delimited by a space like
10 11 13 14 15 17 18 19 31 41 42 51
53 54 56 59 60 ....

Can and how the numbers be looped? something like

for ....%%A ....   do (
...
@echo %%A
...
)

where %%A is one of the numbers. It loops all numbers. May not be in this way. Gurus, any tips will greatly appreciated.

0
Question by:jl66

LVL 54

Accepted Solution

Bill Prew earned 500 total points
ID: 34931326
If you just want each number one by one try this in a BAT file:

@echo off
for /F "tokens=*" %%A in (c:\ee\EE26833047\EE26833047.txt) do (
for %%B in (%%A) do (
echo %%B
)
)

~bp
0

Author Closing Comment

ID: 34931474
Thanks a lot.
0

Featured Post

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question