Path: utzoo!utgpu!water!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!im4u!husc6!uwvax!oddjob!ncar!gatech!uflorida!umd5!ncifcrf!nlm-mcs!brl-adm!adm!rbj@icst-cmr.arpa From: rbj@icst-cmr.arpa (Root Boy Jim) Newsgroups: comp.unix.wizards Subject: Finding where an executable was run from -- a proposal. Message-ID: <14532@brl-adm.ARPA> Date: 24 May 88 18:12:26 GMT Sender: news@brl-adm.ARPA Lines: 23 Posted: Tue May 24 14:12:26 1988 From: "David Korn[eww]" 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. David Korn ulysses!dgk Everyone won't, especially the hackers who want to fake it out. BTW, if you are interested in how to make ksh portable, take a look at how GNU emacs is done. I didn't say it was pretty, but using cpp to build a makefile for you might be a win. (Root Boy) Jim Cottrell National Bureau of Standards Flamer's Hotline: (301) 975-5688 The opinions expressed are solely my own and do not reflect NBS policy or agreement My name is in /usr/dict/words. Is yours?