Initial revision
darcs-hash:20000521125243-92525-6092ab1d3efe6df9898549afb0aa3c7d43983e8b.gz
This commit is contained in:
commit
f1d3de9de7
26 changed files with 621 additions and 0 deletions
36
remail.pas
Normal file
36
remail.pas
Normal file
|
@ -0,0 +1,36 @@
|
|||
program Email;
|
||||
{ce programme permet de transformer /etc/CRANS/personne.cf en une liste d'Emails }
|
||||
{script en pascal par jerome}
|
||||
uses crt,dos;
|
||||
var f: file of char;
|
||||
c:char;
|
||||
s:string[20];
|
||||
begin
|
||||
if paramcount<>2 then
|
||||
begin
|
||||
writeln('orthographe : E-mail_all fichier.txt "subject"');
|
||||
writeln('permet au root d''envoyer un E-mail a tout le monde');
|
||||
writeln('s''integre dans le script E-mail_all, ne pas toucher');
|
||||
halt(0);
|
||||
end;
|
||||
assign (f,'personnes.cf');
|
||||
reset(f);
|
||||
seek(f,0);
|
||||
writeln('#! /bin/zsh');
|
||||
s:=' ';
|
||||
repeat;
|
||||
{$i-}
|
||||
read(f,c);
|
||||
{$i+}
|
||||
if c=#58 then begin
|
||||
repeat
;
|
||||
read(f,c);
|
||||
until c=#10;
|
||||
writeln('cat ',paramstr(1),' | mail -s "', paramstr(2),'" ',s,'@crans.ens-cachan.fr');
|
||||
c:=#32;
|
||||
s:='';
|
||||
end;
|
||||
s:=s+c;
|
||||
until ord(c)=35;
|
||||
close(f);
|
||||
end.
|
Loading…
Add table
Add a link
Reference in a new issue