Difference between revisions of "Export (Bash buildin)"
Jump to navigation
Jump to search
↑ https://www.cyberciti.biz/faq/unix-linux-bash-history-display-date-time/
(16 intermediate revisions by 4 users not shown) | |||
Line 16: | Line 16: | ||
* <code>export [[PATH]]=$PATH:$(dirname $([[go list]] -f '{{.Target}}' .))</code> | * <code>export [[PATH]]=$PATH:$(dirname $([[go list]] -f '{{.Target}}' .))</code> | ||
+ | |||
+ | * <code>[[export]] [[AWS_PROFILE]]=your-profile</code> | ||
+ | |||
+ | |||
+ | export PATH=$HOME/brew/bin:$PATH >> ~/.zshrc # or ~/.bashrc | ||
+ | [[export: not valid in this context]]: /Users/Guest/.bashrc | ||
+ | |||
+ | Solution: check you are not using a shell different from [[Bash]] | ||
+ | |||
+ | |||
+ | == GitLab CI == | ||
+ | [[job_name:]] | ||
+ | [[GitLab pipelines: script:|script:]] | ||
+ | - export | ||
== Related terms == | == Related terms == | ||
* <code>[[~/.zshrc]]</code> | * <code>[[~/.zshrc]]</code> | ||
* <code>[[env]]</code> | * <code>[[env]]</code> | ||
− | * <code>[[declare]]</code> | + | * <code>[[declare -x]]</code> |
* <code>[[locale]]</code> | * <code>[[locale]]</code> | ||
* <code>[[export (TypeScript)]]</code> | * <code>[[export (TypeScript)]]</code> | ||
+ | * <code>[[export -f]]</code> | ||
+ | * [[GitLab environment variables]] | ||
+ | * <code>[[shopt]]</code> | ||
+ | * <code>[[dir env:]]</code> | ||
+ | * [[Powershell]]: <code>[[$env]]:AWS_PROFILE="yourprofile"</code> | ||
+ | * <code>export DATE=$(date -I); echo $DATE</code> | ||
== See also == | == See also == | ||
* {{export}} | * {{export}} | ||
− | * {{ | + | * {{env}} |
+ | * {{builtin}} | ||
[[Category:Computing]] | [[Category:Computing]] |
Latest revision as of 11:23, 12 February 2024
https://man7.org/linux/man-pages/man1/export.1p.html
export YOUR_VARIABLE="YOUR_VALUE"
echo 'export HISTTIMEFORMAT="%d/%m/%y %T "' >> ~/.bash_profile
[1]
export AWS_CLI_AUTO_PROMPT=on
export PATH=$PATH:$(dirname $(go list -f 'Template:.Target' .))
export AWS_PROFILE=your-profile
export PATH=$HOME/brew/bin:$PATH >> ~/.zshrc # or ~/.bashrc export: not valid in this context: /Users/Guest/.bashrc Solution: check you are not using a shell different from Bash
GitLab CI[edit]
job_name: script: - export
Related terms[edit]
~/.zshrc
env
declare -x
locale
export (TypeScript)
export -f
- GitLab environment variables
shopt
dir env:
- Powershell:
$env:AWS_PROFILE="yourprofile"
export DATE=$(date -I); echo $DATE
See also[edit]
export
,env
,printenv
,declare, export -f
,/etc/environment
- Variables: Environment variables,
env
,env-cmd
,.env/
,SHELL
,PS1, HOME, $?
,PATH
,HISTFILE, PWD, LD_LIBRARY_PATH
,printenv, getenv, getenv, direnv
, AWS cli environmental variables, envsubst,env:, env_file
(docker-compose) - builtin
Advertising: