i m doing the folowing:
1) moving a file from one location to another
2) unzipping that file in new location
3) parsing the file in perl in new location (size of file is approx 130 MB)
because of this it takes a long tiime: (approx 1 minute)
i want to speed up this process:
i m sure i can do someting using shell script command:
the parsing script i m using is:
`cp /u/mirror/mirrors/$day.log
.gz /v/admin/extract_logs/`;
`gunzip /v/admin/extract_logs/$day
.log.gz`;
open(FD, "/v/admin/extract_logs/$da
y.log");
while(<FD>) {
if ($_ =~ /$year$month$day.(\d\d)(\d
\d)(.*)QBN
Execution time: (\d*) ms/) {
$ip{$1}{$2} += $4;
$thread_count{$1}{$2}{'cou
nt'} += 1;
}
}
close FD;
this takes 95% of the execution time. this can be replace by gunzip -c piping the output and so on......but don't know how to do it
Thanks,
Start Free Trial