Hi Marcel, You could use the "-p" option.
For example: $ type -p ld /usr/bin/ld Hth Jc On Fri, Dec 6, 2013 at 3:28 AM, Marcel Loose <lo...@astron.nl> wrote: > On 05/12/13 18:27, Matthew Woehlke wrote: > > On 2013-12-05 02:36, Alan W. Irwin wrote: > >> Sorry, this turned out to be a false alarm. Despite "which cmake" > >> telling me I was using cmake-2.8.12.1 [snip] > > > > ...which is, of course, why you should always use "type" in bash > > rather than "which" :-). "type", being a shell built-in, will tell you > > what bash will *actually* run, hashing - and shell builtins, and > > functions, and aliases - included. > > > Hmm, interesting. I didn't know the "type" command. However, is there a > way to easily parse the output of "type"? The "which" command simply > returns the command it will execute or an empty string if there's no > match. With "type", I've seen different outputs, like: > > $ type ls > ls is aliased to `ls --color=auto' > > $ type rm > rm is hashed (/bin/rm) > > $ type ld > ld is /usr/bin/ld > > This make it pretty hard to parse :( > > Best regards, > Marcel Loose. > > > -- > > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the CMake FAQ at: > http://www.cmake.org/Wiki/CMake_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers > -- +1 919 869 8849
-- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers