Skip to main content

Questions tagged [environment-variables]

For questions pertaining to environment variables, a set of dynamic variables that can affect the running processes behavior and access to resources. Use this tag for questions about environment variables or questions about issues arising from the impact of setting or modifying the variables value in running processes behavior and access to resources.

0 votes
1 answer
50 views

I added some environment variables to my ~/.profile, for example: export PIPX_BIN_DIR=$HOME/.pipx-global/bin This works as expected—the executables installed via pipx are placed in the correct ...
Ahmad Ismail's user avatar
  • 3,134
0 votes
2 answers
69 views

my vimrc seems to not play along with vipw/vigr (probably because i only allow root to place tmp/buffers/etc in a secure location) so I tried (using bash): user@host$ EDITOR='/usr/bin/vim -u NONE' ...
gcb's user avatar
  • 953
7 votes
1 answer
281 views

This question asks how to get a list of environment variable names in POSIX sh. The top answer suggests invoking awk via the shell, but gives this caveat: The output is ambiguous if the name of an ...
emron's user avatar
  • 365
0 votes
7 answers
2k views

Bash allows to export read-only variables and functions to the environment. Also, when a bash script is run, Bash sources the file BASH_ENV was set to, unless invoked with -p. How do you protect ...
anick's user avatar
  • 601
0 votes
0 answers
57 views

this is a post that has workaround but not an explanation Sometime in last 4 weeks my LibreOffice on my debian started crashing. Not producing window with eg. LOWriter, just a "crashed docs ...
Marek Sebera's user avatar
0 votes
2 answers
99 views

My login shell is Fish, but I would like to execute a shell command (apt install ...) as if my login shell was Bash. Is it possible to make a command/subprocess believe that my login shell is /usr/bin/...
Alexey's user avatar
  • 2,380
-4 votes
1 answer
89 views

Although this is easy to try and see, I was looking for the answer on StackOverflow and couldn't find it. That's why I'm asking and answering my question. I recommend reading this first. The answer is ...
Daniel Kaplan's user avatar
0 votes
0 answers
46 views

For a school project, I am tasked with making my own (simplified) shell, with bash being the reference point. This includes replicating heredoc behavior which was fun until I stumbled upon variable ...
Mika's user avatar
  • 101
2 votes
4 answers
202 views

I want to line up a couple of Bash functions based on the success or failure of the execution of the preceding function. If something fails, I want to print an error message: function_x has failed. ...
vrms's user avatar
  • 287
0 votes
0 answers
166 views

I'm looking to undo or essentially reset any environment variable changes made by the service when it stops. Can this be done easily by systemd, I haven't found any straight forward way to do so using ...
Maikol's user avatar
  • 164
0 votes
1 answer
107 views

How to make bash not set the underscrore _ variable for the processes that it's starting? Explanation of what it is if you haven't encountered it before: If you launch env from bash, you'll see the ...
VasyaNovikov's user avatar
  • 1,569
0 votes
0 answers
50 views

Context When utilising the IEEE Standard 1003.1-2017 Shell Command Language, I frequently want to reference the value which $HOME contains. However, two methods of dynamically acquiring the path are ...
RokeJulianLockhart's user avatar
0 votes
2 answers
6k views

What is the standard way, in bash, to check if an environment variable is set up? I'm a little confused between the following options: ! [ -z "${VAR}" ] [ -n "${VAR}" ] [ "${...
kj-crypto's user avatar
  • 119
3 votes
1 answer
957 views

I have a BASH pipeline which at a point runs a Singularity container with singularity exec as follows: singularity exec --bind `pwd`:/folder --bind $d:/results <image>.sif <tool_command> -...
Matteo's user avatar
  • 283
5 votes
1 answer
1k views

I have a script and when I run it, it returns Directory not found: ~/Pictures/Wallpaper The script is as follows: #!/bin/bash # Check if the wallpaper directory exists if [ ! -d "$WALLPAPER_DIR&...
PrismaPixel Studios's user avatar

15 30 50 per page
1
2 3 4 5
107