master
esterfreyja 12 months ago
commit d2837df67f

Binary file not shown.

@ -0,0 +1,40 @@
#include <unistd.h>
#include <stdlib.h>
int main(int argc, char *argv[])
{
int i;
int j;
char c;
char *path = getenv("PATH");
i = 0;
j = 0;
if(!path)
{
write(1, "PATH non recuperee, abort\n", 26);
exit(1);
}
while (i < argc)
{
c = i + '0';
write(1, "arg[", 4);
write(1, &c, 1);
write(1, "]=", 2);
j = 0;
while (argv[i][j])
j++;
write(1, argv[i], j);
write(1, "\n", 1);
i++;
}
write(1, "--------------------------------------------------\n", 51);
i = 0;
write(1, "PATH => ", 8);
while(path[i])
{
write(1, &path[i], 1);
i++;
}
write(1, "\n", 1);
return 0;
}
Loading…
Cancel
Save