4.1cBSD/usr/src/bin/rmdir.c

Compare this file to the similar file:
Show the results in this format:

static char *sccsid = "@(#)rmdir.c	4.7 (Berkeley) 12/19/82";
/*
 * Remove directory
 */
#include <stdio.h>

main(argc,argv)
	int argc;
	char **argv;
{
	int errors = 0;

	if (argc < 2) {
		fprintf(stderr, "rmdir: arg count\n");
		exit(1);
	}
	while (--argc)
		if (rmdir(*++argv) < 0) {
			fprintf(stderr, "rmdir: ");
			perror(*argv);;
			errors++;
		}
	exit(errors != 0);
}