Parsing ftp xferlogs
I need to parse ftp xferlogs and our current regex was broken by spaces in uploaded filenames. Have fixed it, is shown below with the names of the fields.
$_ =~ /^(\w{3} \w{3} \s?\d\d? \d\d:\d\d:\d\d \d{4})
(\d\d?)(\S+) (\d+) (.+) ([ab]) (_|C|U|T) (i|o)
(a|g|r) (\w+) (\w+) (0|1) (\w+|\*) ([c|i])$/o;
$current_time = $1;
$transfer_time = $2;
$remote_host = $3;
$byte_count = $4;
$filename = $5;
$transfer_type = $6;
$special_action_flag = $7;
$direction = $8;
$access_mode = $9;
$username = $10;
$service_name =$11;
$authentication_method = $12;
$authenticated_user_id=$13;
$completion_status = $14;
Subscribe via RSS