+ char* command = (char*)calloc(12+strlen(fullFileName)+8+1, sizeof(char));
+ strcat(command, "grep -o ' ' ");
+ strcat(command, fullFileName);
+ strcat(command, " | wc -l");
+ FILE *countSpaces = popen(command, "r");
+ char* buffer = (char*)calloc(32, sizeof(char));
+ fgets(buffer, sizeof(buffer), countSpaces);
+ int n = atoi(buffer) + 1;
+ free(buffer);
+ pclose(countSpaces);
+
+ // open file for reading
+ FILE* file = fopen(fullFileName, "r");
+ free(fullFileName);