- 论坛徽章:
- 1
|
查看Kernel所有2.6.*的 ChangeLog,在目录log中查看所有log文件。
#!/usr/bin/perl -w
use strict;
use warnings;
#
# run command
# wget "http://www.kernel.org/pub/linux/kernel/v2.6/"
# got index.html
# run command
# grep "ChangeLog" index.html>list
my $url = "http://www.kernel.org/pub/linux/kernel/v2.6";
open (LF, ") or die "Couldn't open file list: $!\n";
while (LF>)
{
my $line = $_;
if ( $line =~ /\>(Ch.*?)\/ )
{
#printf $1;
#printf "\n";
my $fn = "$1.log";
my $wcmd = "wget -O log/$fn $url/$1";
printf "$wcmd \n";
`$wcmd`;
}
}
close(LF);
#printf "Bye bye.\n";
exit;
本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u3/99608/showart_2139576.html |
|