2023-10-24 13:59:42 +03:00
|
|
|
#include <stdio.h>
|
|
|
|
#include <stdlib.h>
|
|
|
|
#include <string.h>
|
|
|
|
#include <unistd.h>
|
|
|
|
#include <sys/stat.h>
|
|
|
|
|
|
|
|
//TODO
|
|
|
|
int main(const int argc, const char **argv) {
|
|
|
|
unsigned int r_flag = 0;
|
|
|
|
unsigned int s_flag = 0;
|
|
|
|
|
|
|
|
int i;
|
|
|
|
for (i = 1; i < argc; i++) {
|
|
|
|
if (argv[i][0] != '-')
|
|
|
|
break;
|
|
|
|
|
|
|
|
else if (!strcmp(argv[i], "-r"))
|
|
|
|
r_flag = 1;
|
|
|
|
|
|
|
|
else if (!strcmp(argv[i], "-s"))
|
|
|
|
s_flag = 1;
|
|
|
|
|
|
|
|
else if (!strcmp(argv[i], "--help")) {
|
2023-10-30 18:09:33 +03:00
|
|
|
printf("chmod [-r recursive] [-s silent] [file1 file2...]\n");
|
2023-10-24 13:59:42 +03:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
|