Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!njin!princeton!udel!burdvax!bbking!bcarb From: bcarb@KSP.Unisys.COM (Brian Carb) Newsgroups: comp.unix.questions Subject: How do you find execed pgm directory? Summary: Does anyone know? Message-ID: <703@bbking.KSP.Unisys.COM> Date: 21 Jun 89 13:15:47 GMT References: <9000018@m.cs.uiuc.edu> Organization: Unisys/Knowledge Systems Projects, Frazer, PA Lines: 11 How do you find out the directory of a program that's being run? If you specify an absolute path to start the program, then the directory may be part of the argv list (or $0). However, if the program is found and run from some search of the PATH environment variable, the directory could be any one of the PATH directories. Is there a shell variable that is set to the directory in which the program is found? Please reply via e-mail - thanx. Brian (bcarb@ksp.unisys.com)