On Wed, Aug 18, 2004 at 11:48:56AM -0400, Robert Blayzor said: > I know I can do the following with sigtool:
[snip] > I'm really interested in just getting Version #'s from within a PERL > script. Anyone know how I can accomplish this natively without having > to rely on system calling sigtool externally? You just want the first line of daily.cvd, and the third field of that line. Fields are seperated by ':'. perl: use Tie::File; tie @array, 'Tie::File', '/var/lib/clamav/daily.cvd' or die "Can't open /var/lib/clamav/daily.cvd: $!\n"; @first_line=split /:/, @array[0]; print $first_line[2]; shell: head -n 1 /var/lib/clamav/daily.cvd | awk -F ':' '{print $3}' etc. There's More Than One Way To Do It, though :) -- -------------------------------------------------------------------------- | Stephen Gran | Cheap things are of no value, valuable | | [EMAIL PROTECTED] | things are not cheap. | | http://www.lobefin.net/~steve | | --------------------------------------------------------------------------
pgp4JSyRTykDq.pgp
Description: PGP signature