Solved

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

Posted on 2011-02-18
Medium Priority
879 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
[X]
###### Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

• Help others & share knowledge
• Earn cash & points

LVL 56

Accepted Solution

Bill Prew earned 2000 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

YESTERDAY YESTERDAY.BAT is inspired by a previous article I wrote entitled: TOMORROW.BAT (http://www.experts-exchange.com/OS/Microsoft_Operating_Systems/MS_DOS/A_4196-Advanced-Batch-File-Programming-TOMORROW-BAT.html). The crux of this batch f…
Introduction: Recently, I got a requirement to zip all files individually with batch file script in Windows OS. I don't know much about scripting, but I searched Google and found a lot of examples and websites to complete my task. Finally, I was ab…
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…
###### Suggested Courses
Course of the Month15 days, 14 hours left to enroll