10/06/22 20:09:28
>>138
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
int
main(int argc, char *argv[], char *envp[])
{
char **p, **v;
int lth;
for (p = envp; *p != NULL; p++) {
lth = strchr(*p, '=') - *p;
for (v = argv; *v != NULL; v++) {
if (!strncmp(*p, *v, lth)) {
printf("%s\n", *p);
*p = '\0';
break;
}
}
}
return 0;
}