Here's /bin/env. (was: environment size question).

Mike Wescott wescott at sauron.Columbia.NCR.COM
Tue Jul 12 06:13:15 AEST 1988


In article <249 at oha.UUCP> tony at oha.UUCP (Tony Olekshy) writes:
> [ Source for /bin/env ]
> #include <stdio.h>
> main(c,a,e) char *a[],*e[]; { while (*e!=0) { puts(*e++); } exit(0); }

That'll work fine if all you want out of /bin/env is to print the environment
but how about the rest of the functionality of env?  It's in the code to
handle the selective addition of environment variables in which the bug occurs.
It's not that difficult of a job, but it's not a one-liner either.


-- 
	-Mike Wescott
	 wescott at ncrcae.Columbia.NCR.COM



More information about the Comp.unix.questions mailing list