Hi!
I wanted to simplify my bash prompt, so I edited my etc/bashrc file. I thought this was the file that would override any other env files. When I opened it, I saw that the way it was setup was not what my prompt looked like, although I forget exactly what was there. But i edited it the way I wanted it
and saved it. I quit and restarted the Terminal, but my prompt hadn't changed. I looked at the environment and saw that the prompt was set entirely differently than what was originally in the /etc/bashrc file, or what I changed it to:
So I assumed it must be getting it's environmental variables from some other file. But I don't have any kind of bash files in my home dir, such as .bash_profile, (except .bash_history).
At this point I should mention that I'm using Mac OS 10.6, and the directory setup is a little different in some cases than standard unix.
My question is, where is bash ultimately getting its env variables from, and where might I find this file?
Also, is there a way to write directly to the bash environment from the terminal, such as when you add a directory to your PATH? If so, how should that look?
TIA!
---------- Post updated at 03:33 PM ---------- Previous update was at 03:26 PM ----------
Nevermind, it's the ~/.profile file.
Last edited by sudon't; 11-10-2012 at 04:27 PM..
Reason: forgot a dot
First, type env at the prompt to find out what your environment variables are. Put the command string for how you want your prompt to appear in your .bash_profile file, be sure to export the variable and either log out and log in again, or run source .bash_profile.
Hi,
I am running this on Redhat 5.10
I have a simple test script called test.sh which has the following
contents and it uses the BASH shebang.
-------------------------------------------------------------
#!/bin/bash
eval `/tmp/filereader.pl /tmp/envfile.txt`
echo "TESTPATH=$TESTPATH"
... (28 Replies)
Dear Community,
today my website was under attack for several hours. 2 specific IPs make a tons of "get requests" to a specific page and apache server goes up and down. Now the problem is solved because I put in firewall blacklist these IPs, but I took a lot of time to analyze the apache log to... (6 Replies)
Hi !
I have a problem with an if/else statement in bash.
I want to check if the file exists before running a task (for example here, counting lines), and if not I need to create an empty output file
if
then
wc -l input.tab > output.temp
else
>output.temp
fi
The problem is even if the... (2 Replies)
Can you explain what this line of script is doing.
What I have understood is :
-- variable C is the name of a software which is either not installed, so it must be installed or allready installed and then should be update if newer version found
-- branch B="$B $C" is to install the software
--... (4 Replies)
I need to download team foundation server on Unix (4 simple instructions below), but I am stuck.. I am newbie Unix user, so please be patient.
-cd /home/Myname/Downloads, Unzip
-Unzipped to /home/Myname/DestFolder
-cd DestFolder, type tf -help, works there
- outside this folder, doesn't... (1 Reply)
greetings!
how do i get an env variable that looks like this when echoed:
into a file that looks like this:
keeping in mind that the two constants are the fields from the env variable will always be in odd positions of the string that need to go into the file AND they will always start... (3 Replies)
Hi All, In my account with csh shell, there are lots of env variables set and I want to import those all to bash in one stroke, is there any way to do it ? Thanks, D (1 Reply)
Hello
I have srv RHEL5, file system UTDM (EMC DiskXtender Unix/Linux File System Manager 3.5 & EMC Centera).
it all works under the scheme: have disk is formatted with a file system UTDM, drive open network - NFS, it write data, then migrate the data in the repository - EMC Centera.
There are... (0 Replies)
Hi:
So my current Python (2.52) rig is not working as intended. "echo $PATH" in bash gives me 'X'" that's not what i want, so i need to change my path. To do that, there appeared to be four choices (all in my ~/ directory--note: I'm root, it's my Mac, but i'm in a user account):
.profile... (2 Replies)