Thread View: news.software.nntp
1 messages
1 total messages
Started by Erland Sommarskog
Fri, 27 Jan 1995 11:47
Reading the history file backwards
Author: Erland Sommarskog
Date: Fri, 27 Jan 1995 11:47
Date: Fri, 27 Jan 1995 11:47
25 lines
1824 bytes
1824 bytes
This is what I want to do: I want to read the last lines in my history until I come to a line which fulfils some condition, say arrival time less than an hour ago. The aim is to collect statistics on travel time for the articles, from posting to arrival at our site. I figured that if there is a utility which prints the lines in file in the reverse order, I would have what I'm looking for, but since the history file is huge, 43 MB, there is a catch: the utility has to work like tail, position itself at the end of the file and the read backwards. Saying "print reverse <>" like in the Camel book won't do. Now, does anyone know a program which does this, or have any library routine to share? Perl is preferred, but a C routine is helpful to. Please mail anything you post, as our newsfeed is unrealiable at the moment. (Would you believe it? We're directly on the Internet, and yet it takes days for articles to arrive here.) -- Erland Sommarskog, sommar@enea.se, Stockholm "Person-person - a politically correct designation of 'mail-man'" Wiley's Dictionary
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads