in reply to How to read a logfile and create a build script
I didn't test this but the idea should work. - kel -#!/usr/bin/perl open( FH, "filename" ) || die "No way man\n"; while ( <FH> ) { $data .= $_; } if ( $data =~ m/failed/i ) { $buildmsg = $data; } else { $buildmsg = "BUILD SUCCESSFUL"; } # continue
|
|---|