Computing.Net > Forums > Programming > read till end of file

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

read till end of file

Reply to Message Icon

Name: kyadavalli
Date: February 25, 2009 at 22:36:57 Pacific
OS: Windows XP
Subcategory: General
Comment:

hi,
could you pls help me wrting a script to read from 1st to last line of the file and generate the command like below?
lets say, abc.out has entries like
2222
3333
4444
and it should generate me a command like,
force application('2222','3333','4444')"
abc.out may have 4 entries or 5 or any number and it should generate the command accordingly.
pls help
thanks in advance.



Sponsored Link
Ads by Google

Response Number 1
Name: Mechanix2Go
Date: February 26, 2009 at 00:07:21 Pacific
Reply:

@echo off
setLocal EnableDelayedExpansion

for /f "tokens=* delims= " %%a in (abc.out) do (
set str=!str!'%%a',
)
set str=(!str!)
echo !str!
echo force application!str!


=====================================
If at first you don't succeed, you're about average.

M2


0
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Programming Forum Home


Sponsored links

Ads by Google


Results for: read till end of file

Find a matching line and extract till end of www.computing.net/answers/programming/find-a-matching-line-and-extract-till-end-of-/18943.html

End of file in VB 6 www.computing.net/answers/programming/end-of-file-in-vb-6/5572.html

Urgent C++ End Of File? www.computing.net/answers/programming/urgent-c-end-of-file/11920.html