Question: / / Verify the provided command - line argument and execute respective action if ( strcmp ( argv [ 1 ] , - ux

// Verify the provided command-line argument and execute respective action
if (strcmp(argv[1],"-ux")==0|| strcmp(argv[1],"-ur")==0|| strcmp(argv[1],"-uw")==0||
strcmp(argv[1],"-gx")==0|| strcmp(argv[1],"-gr")==0|| strcmp(argv[1],"-gw")==0||
strcmp(argv[1],"-ox")==0|| strcmp(argv[1],"-or")==0|| strcmp(argv[1],"-ow")==0){
print_files_with_permission(argv[3], argv[1]);
} else {
printf("Invalid command-line argument
");
return 1;
}

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!