1 /* Stops you from accidentally running crontab -r. alias this to crontab.
2 Alternatively, if you are on a GNU system, you can just alias "crontab
3 -r" to "crontab -ri", but this isn't POSIX. */
10 main(int argc, char *argv[]) {
11 char arg[255] = "crontab ";
13 for (int i = 1; i < argc; i++) {
14 strcat(arg, strcat(argv[i], " "));
17 if (strstr(arg, "-r") != NULL) {
18 printf("%s", "Delete user's crontab? [yes/no]: ");
22 ret = scanf("%s", inp);
25 else if (strcmp(inp, "no") == 0)
27 else if (strcmp(inp, "yes") == 0)
30 printf("%s", "Please answer yes or no. [yes/no]: ");