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 ...

learn more… | top users | synonyms

0
votes
2answers
412 views

How can I add a folder containing a semicolon to the Windows PATH?

I noticed that the semicolon ; is a valid character for Windows (NTFS) file and directory names. The semicolon is, however, used as element delimiter for the PATH environment variable. Say I have a ...
1
vote
2answers
135 views

Where a bash variable (proxy) is defined

I have a problem with wget and I've discover that my proxy settings is wrong: $ env | grep "proxy" http_proxy=http://213.181.73.145:80 https_proxy=http://213.181.73.145:80 So, when I try to ...
1
vote
1answer
283 views

Shell script detecting errors from command called by script

I am calling applications from my shell script, which performs a number of important steps in sequence, one step being below: for database in $( echo 'show databases;' | mysql ...
0
votes
1answer
67 views

Is it possible to make the environment ignore $http_proxy env variable for certain urls?

In Firefox, I can set a proxy for all URLs except certain domains. Is it possible to do the same with the http_proxy environmental variable? That is, could I set another variable to exclude certain ...
1
vote
1answer
296 views

Why would the TEMP environment variable contain more than one path?

A colleague's %TEMP% environment variable has this value: C:\Users\his.name\AppData\Local\Temp; C:\Program Files (x86)\MATLAB\MATLAB Compiler Runtime\v78\runtime\win32; C:\Program Files ...
1
vote
2answers
7k views

%USERPROFILE% variable not working

If I try to create files in the command prompt using the commands mkdir C:\Users\Tristan\AppData\Roaming\modinstaller\recovery mkdir C:\Users\Tristan\AppData\Roaming\modinstaller\mods my computer ...
0
votes
1answer
590 views

Switch characters in MAC address from a variable

This batch is used with a few other files as start-up scripts as a part of the Symantec Ghost Cast re-imaging process for Windows 7 we are about to undertake. Together they totally automate the entire ...
4
votes
4answers
4k views

Add a directory and all subdirectories to the PATH variable with a single entry

I've got a directory in my home folder in which I place command-line software (CMD_Software). I put each piece of software in its own directory within CMD_Software in order to avoid clutter. I would ...
1
vote
2answers
475 views

Environment variable not being read

I am running Ubuntu 12.04.2 LTS and am having problems with getting a command to execute. I have set up the variable in /etc/environment which looks like this: FEDORA_HOME="/var/lib/fedora" ...
2
votes
2answers
157 views

Unable to get profile variable using ssh

Unable to retrieve the profile variable using ssh. server2 ==> user apptst ==> bash profile has $APPHOME variable. Was trying to retrieve the value from server1 using ssh but failed. Used options ...
1
vote
1answer
804 views

Setting user environment variables is very slow

I'm using the GitHub for Windows application. Lately I've noticed that starting a PowerShell console from within the GitHub application takes ages. After some digging I've found that the slow command ...
1
vote
3answers
2k views

How can I store encfs6.xml in another location (and still make it detectable)?

How can I make encfs4win search for the encfs6 file in another location? I tried modifying the encfs_mount.cmd file at the end, like so: set ENCFS6_CONFIG=c:/test1/.encfs6.xml %pathtoencfs%encfs ...
1
vote
2answers
1k views

Set three PATHS in Ubuntu

I've been at this all day now, reading every single type of different way to add these lines. It resulted in me being locked out of my profile because I set the .profile wrong. So I'll just ask the ...
0
votes
1answer
42 views

Auditing use of system vars in Win7

I was wondering if there is a way to mount some sort of a hook on a system variable in Win7 which would allow me to trace which application and at what time referenced it. I would like to know this ...
1
vote
0answers
346 views

Path variable broken Windows 7?

I have been trying to compile and execute both Python 2.7 and Java programs on my Windows 7 computer. Both of these have been installed, and I am attempting to run my programs off of the command line. ...
0
votes
1answer
646 views

Ubuntu environment setting for GUI session (or making the same with terminal)

I'm using Ubuntu 10.10 When I log in using normal GUI desktop, it seems that the environment is not the same with the terminal. I modified $PATH and other information in .bashrc. But, this doesn't ...
1
vote
1answer
152 views

What is the significance of the 'Case' in PowerShell's Env: variables?

Why are some of Windows environmental variable names in Proper case, while most are in UPPERCASE? What is the reason that windir alone is in lowercase? Get-ChildItem Env: Sample: Name ...
2
votes
1answer
304 views

Environment variable's address is changing?

Don't ask why I am not posting this at Stack. So I have this small C program. It returns the address of the environment variable specified in argv[1]. #include <stdio.h> #include ...
2
votes
1answer
364 views

Echo string in tcsh with special characters escaped

Is it possible to echo out a string in tcsh such that it is fully escaped, as tcsh would understand? In the same way as printf %q works in bash: % # Create a variable containing a tab character % ...
0
votes
1answer
140 views

Zsh alternative to bash's quick assignment and inheritance trick

There's a trick available in bash allowing you to set environment variable for child process and run it in single line, retaining original values of variable in the shell. For example, in order to set ...
3
votes
1answer
724 views

Does Cygwin import user variables or just system variables?

I can see windows system variables in cygwin with echo $MYVar However, user variables don't seem to work. I'm referring to the variables you set in system properties->advanced->environment ...
4
votes
1answer
759 views

sudo -E not passing all variables

Reading the man pages I expected sudo -E to pass all environment variables to the subshell, but I am not getting the expected results. As expected, awesome: $ export ...
1
vote
2answers
525 views

Can I change the environment on a per-process basis on Windows (like on Unix)?

On Unix operative systems I can start a process with additional environment variables like this: $ DEBUG=1 VERBOSE=3 python myscript.py Does the Windows CMD have an equivalent for this? I'm stuck ...
1
vote
1answer
52 views

Escaping a directory in a $PATH-like list

I'm developing a wrapper for LibGit2, the Git library. And I come out with a problem: Many GIT functions accept path lists, that is, a string composed of a series of paths separated by a token, that ...
1
vote
1answer
4k views

Path variables from system restore point, Windows 7 64-bit

Reading the answer here I don't understand this 'little button' to right of open. Navigate to your C:\Windows\System32\config\RegBack, click the little button to the right of "Open" for "Show ...
1
vote
1answer
428 views

Is it possible to use a Windows environment variable in a Chrome bookmark?

I use a software library whom I often refer to the documentation pages. Those are html pages, therefore I created several bookmarks to quickly access to them. However, when the library version ...
0
votes
0answers
107 views

Set windows system enviroment variable to use the enviroment variable %username%

I'm trying to set a system environment variable to use use the current logged in username. I'm tried the below using the username environment variable but it doesn't work. I'm using "setx /m" on ...
0
votes
2answers
410 views

Root set environment variables

I have a small bash script which downloads a critical file, opens an SFPT connection, puts the file and closes the connection. As you can imagine, my script has some username and password information ...
0
votes
2answers
4k views

Using Call SET to Designate a Variable in a Dos Batch “For” Loop

Trying to use the Call SET to set a variable in a windows batch file loop. Not working but here is the input / output file. trying to assign Var C to equal 1. Batch file: @ECHO OFF for /f ...
0
votes
1answer
31 views

Environment auto-install

When I work, I often have to switch computers or virtual machines which means that every time I switch, I have to set up my (Linux) environment again. My question is the following : Is there a tool ...
17
votes
5answers
10k views

Cannot resolve %windir% / Cannot modify %path% or %path% being reset on boot

See Updates 3 and 4 below for how the issue has evolved My computer (Windows 7 x64, Lenovo Thinkpad T530) is having an issue resolving %windir%. After boot-up, everything works fine. At some ...
0
votes
2answers
3k views

Home directory variable for Windows 8

Is the home directory variable for Windows 8 the same as it was for Windows 7, %UserProfile%?
1
vote
2answers
111 views

Cygwin not cooperating

This is gonna sound very simple for you guys but I've never installed cygwin and the tutorial I used gave no contingency plan for when something goes wrong. I added the path C:\cygwin\bin to my Path ...
1
vote
5answers
1k views

zsh: automatically set environment variables for a directory

Let's say I have a project in: ~/working_dir Whenever I run commands from this directory, I need to have certain environment variables set. So I can export them like so: export VAR=value ...
3
votes
2answers
446 views

Unix environment variables with arguments

I'm trying to set my $EDITOR variable to be emacs with no window, so the command to call it would be emacs -nw. However if I set it like this: export ...
0
votes
1answer
1k views

Update http_proxy environment variable in Ubuntu 12.04

I just updated my proxy username's password and now I want to update the http_proxy environment variable.How can I do it?
6
votes
3answers
5k views

What is the Unix PATH variable and how do I add to it?

Many programming tutorials ask users to add something to their PATH but don't explain what it is. The existing resources that explain the PATH to users new to the command line are not very good. ...
1
vote
1answer
528 views

If you associate a Microsoft Account with a Local Account in Windows 8, will it maintain the original Local USERPROFILE path name?

If you choose to use a Local Account, you get a nice "clean" USERPROFILE path of: C:\Users\username If you then associate a Microsoft Account to that Local Account, will it maintain the original ...
0
votes
0answers
86 views

How to prevent one service from changing the USERPROFILE environment variable for other services?

I am facing a problem on Windows XP with environment variables. Scenario: We have some services installed on an XP machine. These services have login accout set to the Local System acccount. Then ...
1
vote
2answers
878 views

Environment variables not loading on startup

I'm encountering a strange issue where it doesn't look like my environment variables are loading up properly whenever windows starts up. This was actually a pain to figure out what was happening and I ...
0
votes
2answers
218 views

Add a single exe in given directory to PATH environmental variable

Is it possible to add a single program among many in a directory to the PATH environmental variable? Say I have a bunch of programs in D:\utils. Rather than adding D:\utils\ to PATH I want to add ...
1
vote
1answer
457 views

How to save environment variable on my Ubuntu Linux system

I am using Maven to the build process of my Java project. To launch the mvn command in any position within the shell I am using the following command to declare the environment variable in this way: ...
1
vote
1answer
281 views

$HOME environment variable edit

I have a question which might sound quite naive but I would like to confirm the behavior of the $HOME environment variable on the MAC OS X. I would like to know if we can append paths to the $HOME ...
17
votes
4answers
115k views

Easier way to change environment variables in Windows 8? [duplicate]

Possible Duplicate: What are PATH and other environment variables, and how can I set or use them? I know that I can edit my environment variables in windows 8 by going to Start -> All ...
1
vote
0answers
86 views

Windows: Monitor Access to Environment Variables?

Programs (on Windows) often expect certain environment variables to be set. However, the name of these environment variables is often not well documented. E.g.: Does Eclipse expect %MINGW_HOME% or ...
2
votes
2answers
2k views

sudo, runuser, su don't work as I expect when run as root with command as “echo $HOME”

When I run these commands it outputs as shown. /root $ sudo -u someuser -i "echo $HOME" /root $ runuser -l someuser -c "echo $HOME" /root $ su - someuser -c "echo $HOME" /root What i expected ...
4
votes
1answer
1k views

Escaping Variable in Cat

I'm trying to write a shell script over ssh via a bash prompt. The shell, however, insists on interpreting any variable I want to write instead of writing it directly to file. For example, cat ...
1
vote
1answer
1k views

How do I set an environmental variable with a dot?

I couldn't find a way to set an environmental variable with dot (.). For example: export mule.home=/Users/chandra/mule/ export {mule.home}=/Users/chandra/mule/ export $mule.home=/Users/chandra/mule/ ...
0
votes
2answers
709 views

How do I stop the command window from automatically closing at the end? [duplicate]

Possible Duplicate: Batch file that runs cmd.exe, a command, and then stays open at prompt I have a set of environmental variables that I have to run before I can run other operations. I ...
1
vote
3answers
4k views

Term Enviroment Variable not set, when executing a Bash File via SSH

i am trying to run a bash script on a remote machine. If I open a ssh connection in a terminal, i can easily run the script. But when i run it like that: ssh user@ip < /etc/script I get an ...