On second thought here is an even easier way:

set /p line= < myfile.txt


On 5/14/06, Gabor Grothendieck <[EMAIL PROTECTED]> wrote:
> Put the following two lines in your batch file:
>
>  for /f %%a in (myfile.txt) do set line=%%a & goto:nextline
>  :nextlin
>
> The RESOURCES file in the batchfiles*.zip distribution in:
>
>   http://cran.r-project.org/contrib/extra/batchfiles
>
> gives pointers to many batch file resources.
>
> On 5/14/06, MARK LEEDS <[EMAIL PROTECTED]> wrote:
> >
> > ----- Original Message -----
> > From: MARK LEEDS
> > To: [EMAIL PROTECTED]
> > Sent: Sunday, May 14, 2006 9:49 PM
> > Subject: simple .bat question but i can't find out where to post. my 
> > apologiesfor posting a non R question
> >
> >
> > I have what I think is a simple .bat question but i can't figure out where 
> > to post it ( i spent 6 hours looking through tutorials on batch commands 
> > but i haven't had success .
> >
> > Here is my question if anyone wouldn't mind answering :
> >
> > previously, i was on linux and tickerFileToSimulate was a file that 
> > contained a line in the top say "japan".
> >
> > I had shell script in linux that had the following 2 lines in it.
> >
> > TICKER_FILE = 'cat tickerFileToSimulate'
> > file = $TICKER_FILE
> >
> > in this way, the variable $file was set equal to japan.
> >
> > I CANNOT find how to do the equivalent in a .bat file on windows XP.
> >
> > if someone could give me a place to post or tell me how to do it, it would 
> > be really great and again i am sorry for posting this question.
> >
> >        [[alternative HTML version deleted]]
> >
> > ______________________________________________
> > R-help@stat.math.ethz.ch mailing list
> > https://stat.ethz.ch/mailman/listinfo/r-help
> > PLEASE do read the posting guide! 
> > http://www.R-project.org/posting-guide.html
> >
>

______________________________________________
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

Reply via email to