#include <stdio.h>
#include <stdlib.h>


// TODO: Implement a helper named check_permissions that matches the prototype below.
// int check_permissions(char *, char *);

int check_permissions(char *have, char *need) {
	int missing = 0;
	for (int i = 0; i < 11; i++) {
	// Might have it changes to 9 idk yet lol
		// Checks for char literal, '-' and if the position on the two arrays don't match
		if (i != 0 && (need[i] != '-' && need[i] != have[i])){
			missing += 1;
		}
	}
	if (missing == 0){
		return 0;
	}
	else {
		return 1;
	}	
}

int main(int argc, char** argv) {
    if (!(argc == 2 || argc == 3)) {
        fprintf(stderr, "USAGE: count_large size [permissions]\n");
        return 1;
    }
    // TODO: Process command line arguments.
	// Read input of ls -l into variables for each column
	char *perms = malloc(sizeof(char) * 10);
	int fileSize = 0;
	// The first line (Total: ...)
	scanf("%*s %*d");
    // TODO: Call check_permissions as part of your solution to count the files to
    // compute and print the correct value.
	int count = 0;
	while (scanf("%s %*d %*s %*s %d %*s %*d %*s %*s", perms, &fileSize)!=EOF){
		if (fileSize > argc && check_permissions(perms, *argv) == 0) {
			count += 1;
		}
	}
	// free variables and printf number of files 
	printf("%d\n", count);
	free(perms);
    return 0;
}
It should not always return 1