green_lakers has asked for the wisdom of the Perl Monks concerning the following question:
I want to split it by ================= and then if the 4th line of a block is DISSE0029I Current software package status is 'IC--E' then add the first line of the block in an array, if not ignore that block. Your help will be greatly appreciated. This output of the log file will be:Software Package: "MS08-056_KB956464-Officexp_W2K_ENU.1.0.1.0" Operation: install Mode: not-transactional,not-undoable | force | notify_inv +entory Time: 2008-10-28 08:23:52 Log File: catrsts010bns3a:e:\logs\MS08-056_KB956464-Officexp_ +W2K_ENU.1.0.1.0.log ================= DISSE0074I Operation successfully submitted. Distribution ID is 184743 +9935.229087. ================= Software Package: "MS08-056_KB956464-Officexp_W2K_ENU.1.0.1.0" Operation: install Mode: not-transactional,not-undoable | force | notify_inv +entory Time: 2008-10-28 08:38:42 Log File: catrsts010bns3a:e:\logs\MS08-056_KB956464-Officexp_ +W2K_ENU.1.0.1.0.log ================= TEST: DISSE0155I Distribution ID: `1847439935.229087' DISSE0029I Current software package status is 'IC--E'. DISSE0005E Operation unsuccessful. DISSE0442I Execution of user program 'during_install - C:\Staging\MS08 +-056_W2K_ENU.1.0.1.0\setup.exe (/s)' completed with result: 'success' +. DISSE0198I User program exit code: 0 DISSE0111E Unable to remove the path C:\Staging\MS08-056_W2K_ENU.1.0.1 +.0. Errno: 2089877656. =================
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: File parsing
by GrandFather (Saint) on Nov 08, 2008 at 03:32 UTC |