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/
(7 intermediate revisions by 3 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 == | == GitLab CI == | ||
[[job_name:]] | [[job_name:]] | ||
− | [[script:]] | + | [[GitLab pipelines: script:|script:]] |
- export | - export | ||
Line 32: | Line 41: | ||
* <code>[[shopt]]</code> | * <code>[[shopt]]</code> | ||
* <code>[[dir env:]]</code> | * <code>[[dir env:]]</code> | ||
+ | * [[Powershell]]: <code>[[$env]]:AWS_PROFILE="yourprofile"</code> | ||
+ | * <code>export DATE=$(date -I); echo $DATE</code> | ||
== See also == | == See also == |
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: