/* Copyright (c) 1979 Regents of the University of California */
* netmail [-l ...] [-p ...] [-f] [-n] mach
char buf
[BFS
], buf1
[BFS
];
tomach
= getremote(local
);
if(hdir
== 0 || strcmp(hdir
,"/") == 0)hdir
= ".";
while(argc
> 0 && argv
[0][0] == '-'){
case 'l': harg(status
.login
,&argc
,&argv
); break;
case 'p': harg(status
.mpasswd
,&argc
,&argv
); break;
case 'f': status
.force
++; break;
case 'n': status
.nonotify
++; break;
"Usage: netmail [-l login] [-p password] [-f] [-n] [mach]\n");
if(argc
> 0) tomach
= lookup(argv
[0]);
sprintf(buf
,"-m%c",tomach
);
sprintf(buf1
,"%s/mbox.%s",hdir
,longname(tomach
));
mexecl(Bsh
,"sh","-c",cmd
,0);
else kexecl(netcmd
,"net",buf
,"-r",buf1
,"-c","netmail",PRMAIL
,0);
fprintf(stderr
,"Network is down\n");