I'm trying to make a copy of path, here is what I have:
char *path = getenv("PATH");
char *path_copy;
path_copy = (char*)malloc(sizeof(path));
memcpy(path_copy, path, sizeof(path));
and now path is: /soft/linux/bin:/usr/local/bin:/usr/bin:/bin: (etc) but path_copy is: /soft/li
what am I doing wrong?