I have file which contains a huge amount of data. I need to search the pattern Message id. When that pattern is matched I need to get abcdeff0-1g6g-91g3-1z2z-2mm605m90000 to another file.
Kindly provide your input.
File is like below
Jan 11 04:05:10 linux100 |NOTICE |NET|NETDPCclient|thread:1|pid:[1234]: Message id, step 4 (abcdeff0-1g6g-91g3-1z2z-2mm605m90000)
Itried like this but its not working.
$Log="msg.log";
$OVOMSGIDFILE ="file.log";
open(LIST1, "<$Log") or die "Could not open chr1_22.txt: $!";
open(OUTPUT, "+>FILE") or die "Could not open chr1_23.txt: $!" ;
foreach my $line1 (<LIST1>)
{
chomp($line1);
# $line =~ m/'$1 if /Message id.+?(\w+-\w+-\w+-\w+-\w+)/'/);
'say $1 if /Message id.+?\((.+?)\)/' > OUTPUT;