Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
I've got a series of tests i'm trying to automate, and the last step is to take the CSV results file from each individual test, select specific pieces of information, and compile the results into a new CSV.
This is what the CSV looks like:batterytest.txt,,,,,
, 0.000, event, State,Preview,
, 0.516, , , ,//
, 0.517, , , ,// BatteryTest script
, 0.517, , , ,//
, 0.517, , , ,// This will start a record and read the battery every 60 seconds.
, 0.518, , , ,// It will delete the clip so that this will run till the batteries run out
, 0.518, , , ,//
, 0.519, lcd,battery_test, ,
, 0.533, wait, 2, ,
, 2.933,lcdread, battery,235,
.
.
.
,9927.277, event,BatteryStatus,1/3Full,i need the script to look at a directory of csv files, and for each one do the following: log the file name, log the numeric value following the first and last incidence of lcdread, find and log the very last time stamp, then find the first BatteryStatus event and log its time stamp.
it feels a bit complicated, but i don't think i'm being overly ambitious. I think theres a lot of options for how i can go about approaching this. I'm not well versed in programming, but i pick things up quick, so whatever you think is a good solution, i'd be grateful for. I'd prefer something installation light, but i'm not married to the idea. Thanks in advance.

my programming experience is limited, but i get by with excel macros in some places, so i've been poking around there with little success. i tried some bat scripts, but i don't think that i'm going to be able to do the searching i want there. I think i could do it in perl and/or awk, as i did something very similar a few years ago for another company. been a while since i played with either perl or awk tho.

![]() |
![]() |
![]() |

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.
| Ads by Google |