egghelp.org community Forum Index
[ egghelp.org home | forum home ]
egghelp.org community
Discussion of eggdrop bots, shell accounts and tcl scripts.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Reading files

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Scripting Help
View previous topic :: View next topic  
Author Message
ryal
Voice


Joined: 12 May 2005
Posts: 35

PostPosted: Wed Nov 09, 2005 11:18 am    Post subject: Reading files Reply with quote

Hi, me again
I have 2 questions regarding file reading:
1/ is there a way to read only the last line of a file. By that i mean an inbuild function. Cause i can read every line of it till i got the last, but it would be a nice time waste, wouldnt it
2/ is there a function that detects when a file has changed?

My goal is to announce when a file is modified (without having to use timers hopefully) and in that case read the last line.
Back to top
View user's profile Send private message
Sir_Fz
Revered One


Joined: 27 Apr 2003
Posts: 3793
Location: Lebanon

PostPosted: Wed Nov 09, 2005 11:51 am    Post subject: Reply with quote

http://www.tcl.tk/man/tcl8.4/TclCmd/contents.htm and read about file, open and read.
_________________
Follow me on GitHub

- Opposing

Public Tcl scripts
Back to top
View user's profile Send private message Visit poster's website
demond
Revered One


Joined: 12 Jun 2004
Posts: 3073
Location: San Francisco, CA

PostPosted: Thu Nov 10, 2005 12:00 am    Post subject: Reply with quote

you need seek
_________________
connection, sharing, dcc problems? click <here>
before asking for scripting help, read <this>
use [code] tag when posting logs, code
Back to top
View user's profile Send private message Visit poster's website
ryal
Voice


Joined: 12 May 2005
Posts: 35

PostPosted: Thu Nov 10, 2005 11:21 am    Post subject: Reply with quote

Thanks a lot
seek (combined with tell) is working just as i wanted it to
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Scripting Help All times are GMT - 4 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Forum hosting provided by Reverse.net

Powered by phpBB © 2001, 2005 phpBB Group
subGreen style by ktauber