Difference between revisions of "Declare builtin"
Jump to navigation
Jump to search
(4 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
{{lowercase}} | {{lowercase}} | ||
* https://tldp.org/LDP/abs/html/declareref.html | * https://tldp.org/LDP/abs/html/declareref.html | ||
+ | * https://www.gnu.org/software/bash/manual/html_node/Bash-Builtins.html | ||
[[declare -p]] | [[declare -p]] | ||
− | [[declare -x]] | + | [[declare -x]] -x export |
+ | declare -x [[PWD]]="/srv/your-path" | ||
[[declare -r]] | [[declare -r]] | ||
Line 10: | Line 12: | ||
declare: -A: [[invalid option]] | declare: -A: [[invalid option]] | ||
+ | |||
+ | [[export]] DATE=$(date -I); echo $DATE | ||
== See also == | == See also == | ||
* {{export}} | * {{export}} | ||
* {{builtin}} | * {{builtin}} | ||
+ | * {{variable}} | ||
* {{Bash}} | * {{Bash}} | ||
[[Category:Bash]] | [[Category:Bash]] |
Latest revision as of 11:21, 12 February 2024
- https://tldp.org/LDP/abs/html/declareref.html
- https://www.gnu.org/software/bash/manual/html_node/Bash-Builtins.html
declare -p
declare -x -x export declare -x PWD="/srv/your-path"
declare -r
declare: -A: invalid option
export DATE=$(date -I); echo $DATE
See also[edit]
export
,env
,printenv
,declare, export -f
,/etc/environment
- builtin
- Variable, Environment variables,
declare
, Type checking Bash [ -c ]
,alias
,&&
, Bash history, Autocompletion,set
,unset
,export
,.bash_aliases, .bashrc and .bash profile
,PS1
,echo
,brace expansion
, Function,shopt
,trap
,set -e
,source
,PATH
,complete
,disown
,.hushlogin
,.bashrc
,builtin
,eval
,set
,$PATH
,$HOME
,TZ
,.profile
,-e, -i
,Builtin (Bash)
,mapfile
,~
, return (Bash), for, until,declare, dirname, basename, functions.sh
, Bash arithmetic expansion,shift, bash --rcfile, readonly, $1, $@
Advertising: