[Omaha.pm] Log files might be bz2'd hack

Andy Lester andy at petdance.com
Thu Jun 9 09:29:43 PDT 2005


On Thu, Jun 09, 2005 at 11:23:03AM -0500, Jay Hannah (jhannah at omnihotels.com) wrote:
> my $glob = "/junk/__peglogs/comserver-trans-a.log.$y$m$d";
> my $cat = "cat";
> if (`ls $glob*.bz2 2>/dev/null`) {
>    $cat = "bzcat";
> }

You don't need to use `ls` to get a list of files.

my @files = glob( "$glob*.bz2" );

-- 
Andy Lester => andy at petdance.com => www.petdance.com => AIM:petdance


More information about the Omaha-pm mailing list