Monday, January 23, 2012

Using type to check how each command is interpreted

If you are hoping to check how each command is interpreted, then use the BASH BuiltIn command TYPE

To print all the places that contain an executable name you are looking for, use "type -a", you will bring out the alias and the path of the icc. In this case, there is no aliase so the alias did not surface up in the command line
$ type -a icc
icc is /opt/intel/composerxe-2011.2.137/bin/intel64/icc
To check the type of file the executable is categorised ie alias, keyword, function, builtin, file,you can use the command
$ type -t icc

For more usage of type, see the man page.

No comments: