[net.unix] 'env' rewrite posted to net.sources

ignatz@ihuxx.UUCP (Dave Ihnat, Chicago, IL) (08/30/84)

I've re-written the 'env' command, in a manner similar to my
rewrite of 'cut' and 'paste'.  As before, no proprietary code
is used.  However, there is one bit of Bell chauvinism which I
perpetuated, through laziness.  Not until Sys V Release 2 did
the existence of 'extern char **environ' become part of documented
Unix(Tm) arcana, although execl(2) and execv(2), even though 'env(1)'
used it before then.  I, also, use it--since it is now documented &
'real'.  I really hope BSD has it, too--or you guys will have to
write the routine to find the executable 'file' from PATH that I
didn't want to write.

Obviously, due to the nature of the command, it isn't really useful
on any micro not running Unix or a Unix shell look-alike; it's more
for people with Unix systems that just don't have the command.

As usual, questions or bug reports (and fixes?) to me.

	Dave Ihnat
	ihuxx!ignatz

henry@utzoo.UUCP (Henry Spencer) (09/08/84)

> ..............................  Not until Sys V Release 2 did
> the existence of 'extern char **environ' become part of documented
> Unix(Tm) arcana...

Nonsense.  It was documented in V7.  Look carefully at exec(2).
-- 
				Henry Spencer @ U of Toronto Zoology
				{allegra,ihnp4,linus,decvax}!utzoo!henry