Questions tagged [environment-variables]

Environment variables are system-wide variables which share the same value. These variables are often parsed by the shell when executing commands, and are expanded into their appropriate variable. For example, this allows users to move file locations without needing to update hard-coded paths in scripts (they just have to update the environment variable).

Filter by
Sorted by
Tagged with
0
votes
0answers
5 views

How can I use “Edit environment variable” editor for editing system variables instead of “Edit System Variable” editor

Title said it all. I prefer to use "Edit environment variable" (fig 1), which can be seen when editing the path variable for your account, as you can see the entire view of paths. However, when ...
0
votes
0answers
18 views

Setting many variables written in a file to set in the environment of Shell at a time?

I have written many variables to be set as environement variables in a file , how should i set them all at a time . Sample Code in File : BRUN_ABORT_DEPENDENT_JOBS_ON_NONZERO_EXIT="true"; export ...
1
vote
2answers
120 views

Windows: How to save a variable -(input: path) to text file

I'm trying to save a variable to text file, but i'm failing: :folder echo. && echo Where is your folder ? set /p userinputpath = Type input[Drive][Path]: echo "%userinputpath%" >> ...
0
votes
0answers
62 views

Windows Batch Script and handling file names with “!” Exclamation point in For Loop

Part of my script I am having issue with is here: setlocal enabledelayedexpansion for /r %%a in (*) do ( cd "%%~dpa" set /A count += 1 set fn=file!count! %batchdir%\7z.exe a -mx9 -sdel -p"%password%"...
2
votes
1answer
44 views

Why does `sudo env “PATH=$PATH”` do anything at all?

Can anybody explain why this: sudo env "PATH=$PATH" make install is not the same as this: sudo make install ? I had a situation recently where make install failed unless run as shown above. The ...
0
votes
0answers
6 views

How can I configure Buildkite to hide certain strings from the web UI?

I am trying to configure Buildkite to filter certain strings from the output of the web UI. I remember reading in the Buildkite docs about how to tell the buildkite-agent about certain environment ...
-1
votes
0answers
6 views

I have an trouble in my wordpress theme. The error is “Uncaught ReferenceError: theme_scriptspf is not defined” [migrated]

This is messaje from console of chrome: Uncaught ReferenceError: theme_scriptspf is not defined at HTMLDivElement.<anonymous> (ajaxlist.js?ver=2.0:45) at Function.each (jquery.js?ver=1....
0
votes
0answers
8 views

Where does HOST_OPERATING_SYSTEM in uname.c comes from? [migrated]

While reading uname.c (in order to recreate it) I found a variable called HOST_OPERATING_SYSTEM (line 371). It's never mentioned in the same file (as Strg+f told me) and not in the dependencies of ...
0
votes
1answer
27 views

What would happen if someone removed the PATH variable from /etc/environment?

Currently, the best known way we found to add an API key to a remote Ubuntu server was by editing it in as an environment variable in etc/environment. The infrastructure docs of the project were ...
1
vote
1answer
50 views

Windows 10 command prompt is not recognizing any basic commands

I have read forums, but have not found anything useful about what to do, with someone suggesting it might be with my PATH variable, but I don't know how to fix that. Output of ipconfig: Output of ...
-3
votes
0answers
63 views

Find line in .bat file export that line to an ini and mak that line also and system environment variable

Please can somebody help me, I'm searching for a solution: Find string in batch file (findstr) for examp find: NXconfig:xxxxxxxx, I want to findstr Nxconfig with the whole :xxxxxxx then I want to ...
0
votes
0answers
27 views

Problems because of HDD drive letter changed

The laptop is booting from the new SSD. But all my apps are on the HDD. After adding the new SSD, the drive letters of the HDD were changed. Now when I try to run an application that is on the HDD, it ...
0
votes
1answer
49 views

How to get .xinitrc (xinit, startx) to see environment variables

How do I get xinit to see environment variables? Given the following xinitrc: echo test $HOSTNAME test I see the output test test on the terminal, which indicates $HOSTNAME is not set when xinit ...
0
votes
1answer
31 views

Where does systemd actually search for units?

Today I spent too many hours figuring out what is wrong with my systemd which was refusing to find units in .config/systemd/user. The symptoms were: systemd-analyze --user verify <unit> worked ...
0
votes
2answers
31 views

Windows path no longer shows as list in Control Panel Environment Variables

When I manage my environment variables from the Control Panel (System > Advanced system settings > Environment Variables), PATH used to show up as a nice, manageable list of folders which were easy to ...
1
vote
1answer
35 views

Change value of windows USERNAME env variable

By default windows 10 Home has very weird system of how to choose the usernames when you create a new user in the system(in particular during intial set up). So, when I set up my new windows 10 Home ...
2
votes
0answers
52 views

Python and Perl not recognized in cmd even after adding in environment

It was fine yesterday, but it suddenly stopped working today. Both my perl and python were not recognized in cmd. I read as much as i can online for the answers and follow the instruction. I have ...
0
votes
0answers
39 views

Variables not working or stopped working since the update to Windows 10 v1909

We have a custom application that is called by right clicking on a folder or file. it takes the path of the active folder than uses it for performing actions. This used to work flawlessly for years. ...
0
votes
0answers
211 views

stderr: 'chcp' is not recognized as an internal or external command, operable program or batch file

I'm trying to install required dependencies for Intel's DC to edge course. While creating the environment by C:\Geth\DC to Edge Course\Notebooks>conda env create -f environment.yml Collecting ...
0
votes
1answer
55 views

Adding executable files to my PATH in a Linux shell

My goal is to run the R file helloworld.r from my home directory using Rscript in a Linux shell. My helloworld.r file looks like this #!/home/usr/env Rscript print("Hello World") I have added export ...
0
votes
1answer
33 views

Can systemctl return an empty code?

Consider the following setting: systemctl is-active --quiet $SERVICE_NAME STATUS=$? Can it happen under any circumstances that $STATUS is then not set or empty? That is, because systemctl returns no ...
0
votes
0answers
51 views

ssh agent does not create ssh-askpass file

I'm on arch linux and I'm using ksshaskpass as an ssh helper. I'm trying to set up SSH keys for pushing to git. After creating an SSH key and adding it with ssh-add, I go to use it with visual studio ...
0
votes
0answers
19 views

Define environment variables for cronjob

I have a user cronjob which loads environment variables from ~/.bashrc using "source" command. The variables are defined there like: export FOO="bar" However the variables do no appear in the ...
1
vote
0answers
29 views

How do I ensure bash *never* expands paths in environment variables when tab-completing?

$ bash --version GNU bash, version 4.3.48(1)-release (x86_64-pc-linux-gnu) I normally using the above bash version on an Ubuntu 16.04 machine via MATE terminal. Currently however I am using macOS 10....
0
votes
1answer
65 views

trouble with spaces in environment variable in rsync script on MacOS

I have a Bash script that I plan to run for daily backups (my HOME is /Volumes/Norman Data/me): #!/bin/bash # Halt the script on any errors. set -e # Remote server where remote_server="example.com" ...
0
votes
2answers
56 views

Excel Count for Unique Combination without repetition of one variable

I have a list of data grouped by classroom type for example, and each classroom type has two variables that are paired together. I need to count how many unique combinations of these variables there ...
2
votes
0answers
19 views

impossible to open .bat files by double clicking: can't find file [duplicate]

My problem is that when i double click a .bat file it doesn't get opened by cmd and i get this error message: "Windows cannot find 'C:\users\ (my name)\Desktop\test.bat'. Make sure you typed the ...
0
votes
1answer
126 views

How to pass whole environment from target Linux to client Linux over one ssh session?

I have script on target Linux (RedHat, PC_A) which I would like to execute from source Linux (RedHat, PC_B) during remote login session. I'm trying to execute following command : [user2@PC_B] ssh &...
0
votes
0answers
115 views

How to use variables in NGINX RTMP and what do they do?

I've been trying to get my head around how the variables work specifically $name and $app. What are the benefits of using variables within a multi-stream and multiple stream qualities? This is the ...
0
votes
1answer
125 views

Win 10 - Environment variables does not work unless I open the Environment Variables dialog (from system properties) and press “OK”

Environment variables do not work unless I open the Environment Variables dialog (from system properties) and press "OK". EDIT: to clarify, not all paths were broken, later I've realized it was only ...
0
votes
1answer
44 views

Why I can't permanently remove these environment variables into an Ubuntu 18.04 system?

I am not so into Linux and I have the following problem related to how permanentlyunset some environment variables. The problem is that each time that I log into my system, performing the env command ...
0
votes
2answers
27 views

Preserve user input provided in script interaction even upon exiting script

I'm running a script that interacts with different apps based on input supplied by user during interaction with script. While doing so, the user provides the assigned username/password that in turn is ...
0
votes
0answers
19 views

Why performing the env command I obtain different values of the environment variables declared into “/etc/environment”?

I am working on an Ubuntu 18.04.2 LTS system and I have the following doubt. Into the /etc/environment file I have delcared the following variables: PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/...
1
vote
1answer
170 views

Expand Environment Variables in string and store the result in another variable

This may sound a bit silly, as I am not a regular Batch script programmer. How do I expand any Environment Variable inside a string and store the final expanded output into another variable, means ...
0
votes
3answers
55 views

How does the PATH variable look to an application?

I understand that the system and user PATH variables are appended to each other and are seen as a single PATH variable by applications. However, some applications might alter the PATH variable before ...
7
votes
3answers
147 views

PowerShell uses the short 8.3 form for env:Temp

Please help me to deal with PowerShell environment variable. I had learned that PowerShell has special syntax to access the system environment variable values. So I've tried to execute: $env:Temp ...
0
votes
0answers
57 views

How to create custom Global System-wide variables like $Home in Powershell and assign persistent value to it?

I am just starting to learn Powershell and already one thing started bugging me. The undesirably & unfairly confusing discrimination between $env:Home and $HOME. Where $HOME can be autocompleted ...
1
vote
1answer
51 views

How to set default variable for a single command with env variables?

I need to override default browser for single process. This process starts manually from npm scripts. To achieve this programmatically, I decided to override BROWSER environment variable right before ...
0
votes
0answers
10 views

Adding a character and a number to the end of multiple variables in excel

I am looking for an easy way to add a character and number to the end of every variable name. For example, I want the variables named FROM TO DATE1 > 4_DATE1 ID1 > 4_ID1 ...
0
votes
0answers
67 views

Pycharm can't read environment variables correctly anymore

I've recently gone through some upgrades on my system: Mojave to Catalina (MAC OS) Changed default shell to zsh from bash and created an .zshrc cloning my bash equivalent. Upgraded Pycharm to 2019.3 ...
0
votes
1answer
37 views

SSH sends environment variable, but to no effect

I'm SSH'ing from Cygwin into an older SUSE machine. I use: MyHost SetEnv FOO=bar SendEnv BAZ in my ./ssh/config file, and run export BAZ=bar on my Cygwin machine before connection. When I ...
0
votes
0answers
15 views

My system variable path was deleted accidentally and a new one was created [duplicate]

... but that was a yesterday, done by someone else. My pc has already been restarted twice before I came to know about it. Is there any hope AT ALL to recover the PATH? Im on win 7 32 bit.
-1
votes
2answers
100 views

Escape Ampersand in path variable

In my PATH environment variable, there's C:\Program Files (x86)\MySQL\MySQL Fabric 1.5 & MySQL Utilities 1.5 This screws up the whole PATH --- the entries that come afterwards are not taken into ...
0
votes
0answers
36 views

PythonPath Not Initially Recognized

I have created a custom package that users can add to their PythonPath and keep updated via SVN. ONE of the users is having an issue with the PythonPath not being recognized until he opens the ...
1
vote
1answer
93 views

Is it safe to delete duplicate environment variables in the path system variable?

There are multiple "C:\WINDOWS" environment variables and other various duplicated environment variables in the system environment variables that I want to delete because my environment variable is ...
1
vote
1answer
89 views

Command Line Windows: How can I set a global variable within a call?

I want to change a counter variable within a call function. In my example I want to count all subfolders (= count_all) and afterwards I want to increment the count of the subfolders it successfully ...
0
votes
1answer
36 views

WIN10 Environment path variables not recognized when opening terminal from background context

I installed Java RE and Git, for example, and made sure their binaries were added to Environment Path Variables under both User and System variables. When I launch a command prompt from the taskbar, ...
1
vote
0answers
18 views

Trying to pass few variables to linux session from a flat file [duplicate]

I need to export around 10 variables to a session. To do this, I've put all these 10 variables in a flat file and trying to launch this flat file from shell using sh flatfile But these variables ...
0
votes
0answers
48 views

Filename pulled from environment variable doesn't work in Node.JS app, but works entered directly in code?

I have a bash shell script on my Ubuntu 14.04 box that sets some environment variables for a Node.JS process, one of whom is the absolute path to a file. Here is the shell script: #!/usr/bin/env ...
0
votes
1answer
175 views

How do I properly use tokens and skip with REG query?

I am trying to get and set an environment variable for the Steam installation path but I am struggling to understand a couple of things when parsing the value of the path from the registry. I have ...

1
2 3 4 5
23