From an much larger, messy report file, I extracted these lines:


OPM010 HUNT INGR FRI 16/11/12 00:00:00 QRTR
HTGP PEG OVFL
0012 00000 00000
0022 00000 00000
0089 00000 00000
0379 00000 00000
OPM010 HUNT INGR FRI 16/11/12 00:15:00 QRTR
HTGP PEG OVFL
0012 00000 00000
0022 00000 00000
0089 00000 00000
0379 00000 00000
OPM010 HUNT INGR FRI 16/11/12 00:30:00 QRTR
HTGP PEG OVFL
0012 00000 00000
0022 00000 00000
0089 00000 00000
0379 00000 00000
OPM010 HUNT INGR FRI 16/11/12 00:45:00 QRTR
HTGP PEG OVFL
0012 00000 00000
0022 00000 00000
0089 00000 00000
0379 00000 00000
OPM010 HUNT INGR FRI 16/11/12 01:00:00 QRTR
HTGP PEG OVFL
0012 00000 00000
0022 00000 00000
0089 00000 00000
0379 00000 00000
OPM010 HUNT INGR FRI 16/11/12 01:15:00 QRTR
HTGP PEG OVFL
0012 00000 00000
0022 00000 00000
0089 00000 00000
0379 00000 00000

the engineer needs that reformatted into the "log line" the original machine should have written anyway, for importing into Excel:

yyyy-mm-dd;hh:mm:ss;<htgp>;<peg>;<ovfl>;

With Bourne shell, I could eventually whack this out as I usually do, but as a Python pupil, I'd like to see how, learn from you aces and python could do it. :)

thanks
Len


_______________________________________________
Tutor maillist  -  [email protected]
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor

Reply via email to