Xref: utzoo comp.unix.wizards:8798 comp.sources.d:2169 Path: utzoo!attcan!uunet!husc6!ukma!gatech!udel!princeton!mccc!pjh From: pjh@mccc.UUCP (Pete Holsberg) Newsgroups: comp.unix.wizards,comp.sources.d Subject: Re: Finding where an executable was run from -- a proposal. Message-ID: <690@mccc.UUCP> Date: 25 May 88 14:52:45 GMT References: <67@uvaarpa.virginia.edu> <6800012@cpe> <4527@hoptoad.uucp> <52873@sun.uucp> <10310@ulysses.homer.nj.att.com> Reply-To: pjh@mccc.UUCP (Pete Holsberg) Organization: The College On The Other Side of Route 1 Lines: 9 In article <10310@ulysses.homer.nj.att.com> dgk@ulysses.homer.nj.att.com (David Korn[eww]) writes: ... ...ksh passes the full pathname of the executable as the first environment ...variable and names it _. Thus, if the program is run by ksh, ...genenv("_"); returns a pathname for the executable. Now if everyone ...would follow this convention the problem would be solved. Aspen Technology's implementation of ksh sets _ to just the name of the executable. (At least, that is what is stored in _ in the environment space.)