1*17887Sserge static char *sccsid = "@(#)rmdir.c 4.8 (Berkeley) 01/31/85"; 21085Sbill /* 31085Sbill * Remove directory 41085Sbill */ 51085Sbill #include <stdio.h> 61085Sbill 71085Sbill main(argc,argv) 89849Ssam int argc; 99849Ssam char **argv; 101085Sbill { 119849Ssam int errors = 0; 121085Sbill 139849Ssam if (argc < 2) { 14*17887Sserge fprintf(stderr, "usage: %s directory ...\n", argv[0]); 151085Sbill exit(1); 161085Sbill } 179849Ssam while (--argc) 189849Ssam if (rmdir(*++argv) < 0) { 199850Ssam fprintf(stderr, "rmdir: "); 209849Ssam perror(*argv);; 219849Ssam errors++; 229849Ssam } 239849Ssam exit(errors != 0); 241085Sbill } 25