Hi all, I'm trying to parse a log file generated by a virus scanner so I can 
extract the basename from a line, but I can't find the basename function in 
perl.  The line I'm getting in is:

15P4aa-0000U5-00.log:>>> Virus 'W32/Apology-B' found in file \
/var/spool/exim/qtine/15P4aa-0000U5-00.exp/qi_test.exe

The bit I want to get is:

qi_test.exe

What I'm getting is:

var/spool/exim/qtine/15P4aa-0000U5-00.exp/qi_test.exe

and I'm trying (loads of variations of):

grep '^>>>' *.log|perl -nle "print \$1 if (/\/(\S*)$/);" 
-- 
Gary Stainburn
 
This email does not contain private or confidential material as it
may be snooped on by interested government parties for unknown
and undisclosed purposes - Regulation of Investigatory Powers Act, 2000     

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to