On Monday, April 29, 2002, at 07:26 AM, Arshad Tayyeb wrote: > I'm trying to discover the path of a running process > (Codewarrior IDE 7.2), and save it in a perl variable, so I > will know where the application is located later. (This way I > will know where to launch it from if it is quit). > > The only way I can think of doing this is by executing a ps > command, and parsing the output. However, there are some odd > artifacts in the output. > > [...] > > Does anyone know a better way to glean this information?
Perhaps you don't need to. Maybe you could just use the "open" command in the shell (see "man open") to open it without a path. You can do things like this: open -a com.barebones.bbedit file.txt That will find BBEdit, wherever it is, and launch it. A potential snafu is that it seems to require a file to open, you can't just launch the application by itself. Anyone know a way around this? -Ken