#!/usr/bin/perl
$filename=shift || die "no arg\n";
$filename .= '*' if $filename ne '*';
$path='/var/log/httpd';
$totallog='/tmp/result_log';
open(RESULT,">$totallog");
while (glob "$path/$filename") {
open(FH,"$_");
print RESULT $_ while;
close(FH)
}
close(RESULT);
$filename=shift || die "no arg\n";
$filename .= '*' if $filename ne '*';
$path='/var/log/httpd';
$totallog='/tmp/result_log';
open(RESULT,">$totallog");
while (glob "$path/$filename") {
open(FH,"$_");
print RESULT $_ while
close(FH)
}
close(RESULT);
全站熱搜
留言列表