Hylafax Mailing List Archives
|
[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
Re: Brodcast Faxing
This perl script does not work via at but I think that it
can be made to work. I believe that the broken part is my
.hylarc for the generation of the cover page. I would like
this launched by at. In order to do that I think that I
need a shell script to begin the whole shooting match
#!/usr/bin/perl
$from_var = "Wisconsin Chapter EASA";
$re_var = "Extended Deadline for Tri-Chapter"
$ph_file = "Request.txt";
$fax_files = "pg1.ps pg2.ps pg3.ps pg4.ps pg5.ps";
open (FILE,$ph_file) || die "Can not open file";
open (NEWFILE,">faxnumbers") || die "Can not open file";
@lines = <FILE>;
$x = 0;
while ($lines[$x]){
$lines[$x] =~ s/\r\n/\n/g;
$lines[$x] =~ s/\"//g;
($ph, $name, $company) = split(/,/,$lines[$x]);
$ph =~ s/-//g;
chop $company;
# check for local calls
if ($ph =~ /^329./){
$cmd = "sendfax -f \"$from_var\" -x \"$company\" -r
\"$re_var\" -d \"$name\@$ph\" $fax_files";
}
else {
$cmd = "sendfax -f \"$from_var\" -x \"$company\" -r
\"$re_var\" -d \"$name\@1$ph\" $fax_files";
}
$x++;
system $cmd;
sleep 180;
}
--
Dave Waller
Precision Drive and Control
For some reason a glaze passes over people's faces when you
say
"Canada". Maybe we should invade South Dakota or something.
-- Sandra Gotlieb, wife of the Canadian ambassador to the
U.S.