Bash type: Difference between revisions
Jump to navigation
Jump to search
(One intermediate revision by the same user not shown) | |||
Line 10: | Line 10: | ||
Also see: {{Internal|Bash_Functions#Function_Info|Function Info}} | Also see: {{Internal|Bash_Functions#Function_Info|Function Info}} | ||
Applies to executables too, in which case displays the file the executable is available as. | |||
=Options= | =Options= | ||
Line 15: | Line 17: | ||
==-t== | ==-t== | ||
<tt>type</tt> 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. | <tt>type</tt> prints a string which is one of "alias", "keyword", "function", "[[Bash_Concepts#Builtin|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. |
Latest revision as of 20:58, 9 March 2020
Internal
Overview
type function_name
returns the source of that particular function.
Also see:
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.