Hi,

here is a version of rmdir(1) in the spirit of mkfifo.c.

Felix
#include <stdlib.h>
#include <unistd.h>
#include "util.h"

int
main(int argc, char *argv[])
{
	while(getopt(argc, argv, "") != -1)
		exit(EXIT_FAILURE);
	for(; optind < argc; optind++)
		if(rmdir(argv[optind]) == -1)
			eprintf("remove %s:", argv[optind]);
	return EXIT_SUCCESS;
}

Reply via email to