I am using a while loop to detect the presence of a ">" symbol in an array. The loop conditional never evaluates to true. When I show the contents of the array, the ">" symbol is there by itself though. In my code, this isn't the first call to strtok. This is also only a snippet of the total code. The string to be broken up by strtok is "ls > testfile.txt". Any help would be appreciated.
while (userArgs[k] != ">") {
k++;
userArgs[k] = strtok(NULL, " ");
if(userArgs[k] == ">") {
break;
}
if (userArgs[k] == NULL){
break;
}
}