I work in an investment bank. We have a huge log file which contains FIX messages. I have a problem to grep FIX messages within a time rage (i.e. between 9:30 am to 11 pm, those were sent by CITIBANK for ticker symbol MSFT). I tried different ways but it did not work. Could anyone please help me?
Here is one of the codes in perl:
[CODE=perl]#!/usr/bin/perl –w
$myfile = “/tmp/fixlog.txt”;
open(FH, $myfile) || die “Can not open”;
while<FH>{
chomp;
print “$_\n” if (m/CITIBANK/ | /MSFT/ | /20071115-09:30:00 ~ 20071115-11:00:00/);
close(FH);[/CODE]
Here is a code in grep:
[CODE=perl] grep ‘/CITIBANK/’ | ‘/MSFT/’ | ‘/20071115-09:30:00 ~ 20071115-11:00:00/’ fixlog[/CODE]
Here is one of the codes in perl:
[CODE=perl]#!/usr/bin/perl –w
$myfile = “/tmp/fixlog.txt”;
open(FH, $myfile) || die “Can not open”;
while<FH>{
chomp;
print “$_\n” if (m/CITIBANK/ | /MSFT/ | /20071115-09:30:00 ~ 20071115-11:00:00/);
close(FH);[/CODE]
Here is a code in grep:
[CODE=perl] grep ‘/CITIBANK/’ | ‘/MSFT/’ | ‘/20071115-09:30:00 ~ 20071115-11:00:00/’ fixlog[/CODE]
Comment