Tagged Questions
1
vote
2answers
59 views
How to print shell variables and values to be able to copy/paste them?
In Bash 4.2.25, the set and env output is not escaped, so shell escapes and any non-printable characters won't be copy-pasteable. Take for example this shell session:
$ export foo=$'a\nbar=\baz'
$ ...
-2
votes
1answer
46 views
Paths in my bash profile do not work!
export PATH=/usr/local/bin:/Users/rodrigoprugue/Desktop/CRUNCH:~/phreeqc/bin:$PATH
export PARFLOW_DIR=~/parflow/parflow.r605/
export SILO_DIR=~/parflow/silo-4.7.2/
export ...
4
votes
4answers
107 views
Detecting X session in a bash script (.bashrc etc.)
Recently I put xset b off to my .bashrc. Now I'm annoyed by the error thet pops up when I log in via tty or via ssh, i.e. outside X session.
First thing that came in my mind was [[ -z "$SOME_VAR" ]] ...
2
votes
1answer
54 views
How to print apparently hidden environment variables?
Environment variables can be shown with env; but, some are not shown. For example...
echo $EUID might produce as result of 1000 yet
env | grep EUID produces no result.
What is this type of variable? ...
1
vote
2answers
96 views
How do I set an environment variable for sudo in MacOS?
I have installed ServiceMix on my machine, and am trying to start it. The startup script is called start.sh. When I did ./start.sh, it gave me a Permission Denied message. So I used sudo ./start.sh, ...
2
votes
1answer
171 views
Users home path in a bash script
I'm writing a bash-script that will be run as a cron job everyday. Very basic, I was wanting to change the wallpaper daily. I have mint-14 with mate.
The thing I'm getting caught up on right now ...
1
vote
2answers
96 views
OS X setting environment variables
I have OSX 10.8.2 with ZSH as my shell and iTerm as a terminal (don't know if the last thing is relevant). I have to mention that I'm relatively new to OSX.
I'm trying to set up some environment ...
2
votes
1answer
195 views
How to run Steam from the Xfce desktop?
I've installed Steam on Debian 7.0 without any hassle, and I can run it by typing steam &.
I've set it as a desktop launcher in Xfce, but when I ran it, nothing happened.
Then I've check the ...
1
vote
1answer
102 views
Environment auto-install script
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.
Is there a tool (in contrast to a simple bash ...
2
votes
3answers
95 views
Bash - setting environment vars from bash invocation line
I'm looking for a way to manipulate some env var, which will be available for processes spawned by bash.
Something like the below (of course, the syntax is not correct)
/bin/bash VAR_X=2
and then ...
3
votes
2answers
224 views
Environment variable set but not respected
I find the following behavior a little confusing, can someone please explain why it happens?
In /etc/bash.bashrc I have:
EDITOR=vim
And it is indeed set:
lev@home ~ $ echo $EDITOR
vim
I would ...
5
votes
1answer
262 views
Difference between environment variable and shell variable
It is said that environment variables are inherited in child processes but shell variables are not. However the following test shows shell variables are seen in child process just as environment ...
6
votes
2answers
263 views
How can I create a clean shell environment for temporary use?
I am a frequent answerer on a Unix-focused popular Q&A site, and in many of my answers I provide examples using the bash shell. However, each time I do this I have to manually go through the ...
3
votes
0answers
97 views
tab-expansion and “./” bash shell [closed]
Maybe someone here would be able to help me out. Have installed Ubuntu 12.04 LTS (kubuntu) on two machines. The .bashrc and .bash_profile files are identical as the file structures on each machine is ...
3
votes
3answers
249 views
Bash shells with different environment variables
I want to somehow enter a different bash shell with some altered environment variables.
For example, if I run script bfin.sh and it contains something like
export PATH=/home/me/bfin2012:$PATH
I ...