Re: [R] simple .bat question but i can't find out where to post. my apologies for posting a non R question

From: Gabor Grothendieck <ggrothendieck_at_gmail.com>
Date: Mon 15 May 2006 - 13:52:32 EST

On second thought here is an even easier way:

set /p line= < myfile.txt

On 5/14/06, Gabor Grothendieck <ggrothendieck@gmail.com> 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 <markleeds@verizon.net> wrote:
> >
> > ----- Original Message -----
> > From: MARK LEEDS
> > To: r-help-request@stat.math.ethz.ch
> > 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 Received on Mon May 15 13:55:55 2006

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Mon 15 May 2006 - 16:10:15 EST.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.