If you know it's always the last say 50 lines then you can use the unix
command 'tail -50 < file1 > file2' and then scan in file2. You can do this
unix command from within Splus with unix("tail -50 < file1 > file2").
That's if you are on a Unix system.
Windows doesn't have those unix facilities pre-installed, but you can always
install them yourself. There are various sites - I use the cygwin32 package,
which has the usual unix utilities like grep, sed and awk. Try an internet
search for the web site. And there's always perl...
To run a system command from windows you use either dos() or system().
Nick Ellis
CSIRO Marine Research mailto:Nick.Ellis@marine.csiro.au
PO Box 120 ph +61 (07) 3826 7260
Cleveland QLD 4163 fax +61 (07) 3826 7222
Australia http://www.marine.csiro.au
> -----Original Message-----
> From: klchu@garnet.acns.fsu.edu [mailto:klchu@garnet.acns.fsu.edu]
> Sent: Wednesday, 27 October 1999 4:51
> To: Jack Lewis; s-news@wubios.wustl.edu
> Subject: [S] scan data from the end
>
>
>
> Hi,
>
> I am working on a simulation with 100 replicates using S-plus
> to control
> three other software. my problem is one of the software puts
> the information
> I need at the end of a output file. The output file includes
> pages of report
> lines and tables (8 pages for my case). The information I
> need embedded at
> the end of the report using space (or tab) delimited.
>
> My question is can I scan the file from the end? If yes, what is the
> commend? (I thought about using "skip", but if there are
> better ways I would
> rather try them.)
>
>
> Thanks!
>
> Kwang-lee
>
> --------------------------------------------------------------
> ---------
> This message was distributed by s-news@wubios.wustl.edu. To
> unsubscribe
> send e-mail to s-news-request@wubios.wustl.edu with the BODY of the
> message: unsubscribe s-news
>
-----------------------------------------------------------------------
This message was distributed by s-news@wubios.wustl.edu. To unsubscribe
send e-mail to s-news-request@wubios.wustl.edu with the BODY of the
message: unsubscribe s-news
|