Quote Originally Posted by aGerman View Post
You left out strspn in your example code, right?

However, what shell do you use to call your program?
Sorry, must have cut the function name instead of copying it.
Code:
#include <stdio.h>
#include <string.h>
 
int main (int argc, char *argv[])
{
    printf("Location: %lu\n", strspn(argv[1], "#"));

    return(0);

}
I use Bash shell, and I am starting to think this may be the problem. I just don't know why it's happening with filenames.