Bash declare/typeset: Difference between revisions
Jump to navigation
Jump to search
(Created page with "=Internal= * bash =Overview= <tt>declare</tt> and <tt>typeset</tt> are equivalent. =Options= ==-p== Without an argument, the command will disp...") |
(→-F) |
||
Line 24: | Line 24: | ||
declare -f get_user_name | declare -f get_user_name | ||
... | ... | ||
Also see {{Internal|Bash_Functions#Function_Info|Function Info}} | |||
==-f== | ==-f== |
Revision as of 00:44, 16 July 2017
Internal
Overview
declare and typeset are equivalent.
Options
-p
Without an argument, the command will display the attributes and values of each variable name.
-F
Returns the name of the functions declared in the current context. Returns output similar to:
declare -f backup declare -f comma_separated_list_to_space_separated declare -f debug declare -f debug_args declare -f debug_args_no_nl declare -f get_user_name ...
Also see
-f
Returns a functions' body.
typeset -f declare -f