[cmake-developers] Minor regression in --version results for CMake 2.8.12.1 (A FALSE ALARM)

Marcel Loose loose at astron.nl
Fri Dec 6 03:28:02 EST 2013


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.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: loose.vcf
Type: text/x-vcard
Size: 292 bytes
Desc: not available
URL: <http://public.kitware.com/pipermail/cmake-developers/attachments/20131206/c52d97a8/attachment-0002.vcf>


More information about the cmake-developers mailing list