#!/usr/bin/perl -w #### #### Über script dat .eml files naar tarballen omzet :) #### 240205 #### #### array voor maandnaam toevoeging use strict; use warnings; my $i = 0; my @files = (); my %opties = ( 'filedir', '/usr/local/assp/spam/', 'archdir', '/usr/mail/tar/', 'fext', '.eml' ); foreach (`ls -lT $opties{filedir}`) #make a list of the files {push @files,$_ if /.$opties{fext}$/;} #only add e-mail files foreach(@files) { $i++; my @data = split(/\s+/,$_); #remove whitespace `tar --append --file $opties{archdir}$data[5]$data[8].tar $opties{filedir}$data[9] &>/dev/null`; print "$i of ".scalar(@files)."\n"; } #tar the file into an archive by month and year (ex : Dec2004.tar) 1;