Bash type

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

Internal

Overview

type function_name

returns the source of that particular function.

Also see:

Function Info

Applies to executables too, in which case displays the file the executable is available as.

Options

-t

type prints a string which is one of "alias", "keyword", "function", "builtin", or "file" if the argument is an alias, shell reserved word, function, builtin, or disk file, respectively. If the name is not found, then nothing is printed, and an exit status of false is returned.