How do you find execed pgm directory?

Brian Carb bcarb at KSP.Unisys.COM
Wed Jun 21 23:15:47 AEST 1989


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 at ksp.unisys.com)



More information about the Comp.unix.questions mailing list