10 static const char* helptext
= "Usage: remove [-v] <PATH> [<PATH> [...]]\n"
11 "Remove files and directories alike.\n";
13 int main(int argc
, char** argv
)
19 setlocale(LC_ALL
, "");
21 if(argc
== 2 && strcmp(argv
[1], "--help")==0)
27 if(argc
>= 2 && (strcmp(argv
[1], "-v")==0 || strcmp(argv
[1], "--verbose")==0))
35 fprintf(stderr
, helptext
);
39 while(argv
[++idx
] != NULL
)
41 fail
= remove(argv
[idx
]);
42 if(fail
!= 0) err(errno
, "%s", argv
[idx
]);
43 if(verbose
) warnx(dcgettext("coreutils", "%s: removed", LC_MESSAGES
), argv
[idx
]);