2
votes
Accepted
Set PATH for /bin/sh in Debian:11 image
For /bin/sh in Debian (dash), /etc/profile and so on are only used for login shells. For non-login shells, you can specify a startup script to use in the ENV environment variable. At the end of your ...
1
vote
How to prepend a prefix to variables sourced from a config/env file
A slight addition to @xhienne's answer, with a regexp that will recognize # at beginning-of-line as a comment, and some QED exercises showing that both sourcing and exporting work using this techique.
...
1
vote
How to prepend a prefix to variables sourced from a config/env file
Here is a naive solution using sed:
source <(sed 's/[^=]\+=/export my_app_&/' local.env)
I call this "naive" because I assume that each line containing an equal sign is a variable ...
1
vote
What is the `COLOR` environment variable?
As you saw, there is no standardization on such field. There were some discussion (some also recently) to standardize one environment so that programs know if they should use colors or not, but such ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
environment-variables × 1546bash × 522
shell × 270
shell-script × 154
linux × 143
path × 135
zsh × 72
sudo × 72
ubuntu × 63
systemd × 57
debian × 52
ssh × 43
cron × 42
variable × 39
profile × 39
python × 35
terminal × 32
scripting × 31
login × 29
java × 29
command-line × 26
centos × 23
rhel × 22
macos × 22
security × 21