running my logscript has made me ponder a few things, and I have some questions
you scripting pros especially could help me out with.
One of them being that maaaby, I should've done the appendfile thingy after
each logfile hehe.
But you know, that's why I did the script, to learn from it. So I've thought
about it for some days,
and have some questions:
1. Is there a way to increase performance by reading blocks of data from
the logfiles, instead of
line by line ?
2. If I was to add a progress indicator, wouldn't that need to know how many
files in total it's looking
through, to be able to scale the indicator accordingly ? I'm thinking about
doing a progress indicator
- Progress in relation to the current logfile
- In relation to the current folder
- In relation to the total number of files
3. I'm considering also displaying a counter for how many results it's found.
Is there a way to statically
define a variable that's shown on screen, and when the value is updated,
it's updated on screen, but
not in a new screen position ? (I know Rexx had this in OS/2)
4. Also considering displaying some metrics. How much data, how many files,
how many lines exactly,
etc. Any obvious cmdlets or methods to use here, other then getting filesizes,
counting lines in a log-
file, etc. ?
Hope you can help me out with those questions. It's funny how when you've
made a script like that, and
you're running it (especially on such amounts of data), the obvious lacks
tend to get in your face pretty
But it's all good, I'm hoping to learn from it, and I'm hoping you can help
me out a bit, learning :)
Jacob Saaby Nielsen