xref: /csrg-svn/bin/rmdir/rmdir.c (revision 9849)
1*9849Ssam static char *sccsid = "@(#)rmdir.c	4.6 (Berkeley) 12/19/82";
21085Sbill /*
31085Sbill  * Remove directory
41085Sbill  */
51085Sbill #include <stdio.h>
61085Sbill 
71085Sbill main(argc,argv)
8*9849Ssam 	int argc;
9*9849Ssam 	char **argv;
101085Sbill {
11*9849Ssam 	int errors = 0;
121085Sbill 
13*9849Ssam 	if (argc < 2) {
141085Sbill 		fprintf(stderr, "rmdir: arg count\n");
151085Sbill 		exit(1);
161085Sbill 	}
17*9849Ssam 	while (--argc)
18*9849Ssam 		if (rmdir(*++argv) < 0) {
19*9849Ssam 			perror(*argv);;
20*9849Ssam 			errors++;
21*9849Ssam 		}
22*9849Ssam 	exit(errors != 0);
231085Sbill }
24