Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

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

Posted on 2011-02-18
2
Medium Priority
?
883 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 59

Accepted Solution

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

Open in new window

~bp
0
 

Author Closing Comment

by:jl66
ID: 34931474
Thanks a lot.
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

The following is a collection of cases for strange behaviour when using advanced techniques in DOS batch files. You should have some basic experience in batch "programming", as I'm assuming some knowledge and not further explain the basics. For some…
Being a system administrator some time we require to do things remotely, one of them is installing software. Here I am going to tell you how to install software through wmic (Windows management instrument console). I am not at all saying that this i…
this video summaries big data hadoop online training demo (http://onlineitguru.com/big-data-hadoop-online-training-placement.html) , and covers basics in big data hadoop .
In response to a need for security and privacy, and to continue fostering an environment members can turn to for support, solutions, and education, Experts Exchange has created anonymous question capabilities. This new feature is available to our Pr…
Suggested Courses

876 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