On Tue, 19 Jan 2021 13:46:18 +0000, Pancho
wrote:
> Yeah that is kind of the point, I'm a mediocre old programmer, I don't
> want to know everything about everything. What I want is an easy life. I
> want a basic technique to work, reliably, environment agnostically as
> possible.
>
> I think this clarifies in my mind why I wouldn't ever use this technique
> to observe events in practice. It is too fragile.
FWIW:
I use gawk to follow logfiles, and the fflush() function to
flush the output buffers.
Snippet of Bash script :
tail -f -n $TLINES $LOGFILE \
| gawk -f $SCRIPT.awk \
| sqlite3 $DATABASE
pseudocode of $SCRIPT.awk :
process every input line
console output to "/dev/stderr"
-> realtime filtered, reformatted view
SQL statements to stdout
-> statistics
After processing every input line:
fflush()
--
Regards,
Kees Nuyt
--- SoupGate-Win32 v1.05
* Origin: Agency HUB, Dunedin - New Zealand | FidoUsenet Gateway (3:770/3)
|