mis ailleurs car scripts != binaire
darcs-hash:20000521151713-92525-12994fad1087038020435b03dd4e9ca4167991b9.gz
This commit is contained in:
parent
a3f2e962f4
commit
3adee2e6d2
2 changed files with 0 additions and 36 deletions
BIN
remail
BIN
remail
Binary file not shown.
36
remail.pas
36
remail.pas
|
@ -1,36 +0,0 @@
|
||||||
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