In article <
0b69dbb9-a6f0-4c99...@googlegroups.com>,
This may or may not be what you are looking for, but this is a script that
I wrote decades ago called "Instrument", that I use to run a program with a
timestamp on each line in the log file:
--- Cut Here ---
#!/bin/expect --
# Post process the log file with:
# awk '-F\r' '{print $2,$1}' /tmp/typescript
log_file -noappend /tmp/typescript
eval spawn $argv
interact -o "\n" { send_user [timestamp -format %c\n] }
--- Cut Here ---
I know this worked long ago; I haven't had the need to use it any time recently.
Note: In case it isn't clear from the comments in the code, you run the thing like:
$ Instrument some command line
Which produces a log file, which you then read via the AWK command line shown.
--
I am not a troll.
Rick C. Hodgin
I am not a crook.
Rick M. Nixon