Quote:
Originally posted by linux_console
For getting the application path, you could try scanning the PATH enviroment variable, searching in each directory in the variable for the application that is being sought. Or you could parse the output of "whereis". I'm pretty sure that "whereis" simply does just that, since you can't run it without an absolute path and without it being in one of the PATH directories.
|
If this will be done by getting output of a console command; then i think the command should be
which :
[root@earth]# whereis ping
ping: /bin/ping /usr/share/man/man8/ping.8.gz
[root@earth]# which ping
/bin/ping
No need to parse something ;-)