Solved

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

Posted on 2011-02-18
2
868 Views
Last Modified: 2012-05-11
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
Comment
Question by:jl66
2 Comments
 
LVL 51

Accepted Solution

by:
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
  )
)

Open in new window

~bp
0
 

Author Closing Comment

by:jl66
ID: 34931474
Thanks a lot.
0

Featured Post

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

TOMORROW TOMORROW.BAT is inspired by a question I get asked over and over again; that is, "How can I use batch file commands to obtain tomorrow's date?" The crux of this batch file revolves around the XCOPY command - a technique I discovered w…
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…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
This video discusses moving either the default database or any database to a new volume.

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now