godspeed06
Vendor
Good day fellow perlers,
I want to extract [day, month, date, time, year and all account (C235098)] in this case, and associated “incoming” and “outgoing” directories in a report format. This information is being extracted from an ftp server ‘xferlog.’
Script:
#!/usr/bin/perl -w
use strict;
$xferlog="./xferlog";
$\ = "\n";
$i=0;
open XFERLOG, $xferlog or die "Cant't find file $xferlog";
foreach $line (<XFERLOG>) {
...
}
close XFERLOG
PERL version:
This is perl, v5.8.5
output:
Tue Jun 14 20:00:39 2005 28 company.someplace.com 2907017 /ftp/software/C235098/outgoing/CABBD.CSV a _ o g C235098 ftp 0 * c
Tue Jun 14 20:00:59 2005 15 company.someplace.com 2479965 /ftp/software/C235098/outgoing/SWIF3.CSV a _ o g C235098 ftp 0 * c
Tue Jun 14 20:01:32 2005 15 company.someplace.com 302558 /ftp/software/C235098/incoming/mont003 a _ i g C235098 ftp 0 * c
Tue Jun 14 20:01:38 2005 3 company.someplace.com 67279 /ftp/software/C235098/incoming/MONT004 a _ i g C235098 ftp 0 * c
I want to extract [day, month, date, time, year and all account (C235098)] in this case, and associated “incoming” and “outgoing” directories in a report format. This information is being extracted from an ftp server ‘xferlog.’
Script:
#!/usr/bin/perl -w
use strict;
$xferlog="./xferlog";
$\ = "\n";
$i=0;
open XFERLOG, $xferlog or die "Cant't find file $xferlog";
foreach $line (<XFERLOG>) {
...
}
close XFERLOG
PERL version:
This is perl, v5.8.5
output:
Tue Jun 14 20:00:39 2005 28 company.someplace.com 2907017 /ftp/software/C235098/outgoing/CABBD.CSV a _ o g C235098 ftp 0 * c
Tue Jun 14 20:00:59 2005 15 company.someplace.com 2479965 /ftp/software/C235098/outgoing/SWIF3.CSV a _ o g C235098 ftp 0 * c
Tue Jun 14 20:01:32 2005 15 company.someplace.com 302558 /ftp/software/C235098/incoming/mont003 a _ i g C235098 ftp 0 * c
Tue Jun 14 20:01:38 2005 3 company.someplace.com 67279 /ftp/software/C235098/incoming/MONT004 a _ i g C235098 ftp 0 * c