How to modify my .bashrc file?
Hi, I may have asked something similar before, but now I'm ready to explain my problem "more in detail" (hope it makes sense)
I'm trying to install a compiler named HLA and make it work;
after decompressing some files and following some simple instructions these follows:
• Next, (logged in as a plain user rather than root or the super-user), I edited the ".bashrc" file in my home directory ("/home/rhyde" in my particular case, this will probably be different for you). I found the line that defined the "path" variable, it originally looked like this on my system:
PATH=$DBROOT/bin:$DBROOT/pgm:$PATH
I edited this line to add the path to the HLA directory, producing the following:
PATH=$DBROOT/bin:$DBROOT/pgm:/usr/hla:$PATH
Without this modification, *NIX will probably not find HLA when you attempt to execute it unless you type a full path (e.g., "/usr/hla/hla") when running the program. Since this is a pain, you’ll definitely want to add "/usr/hla" to your path. Of course, if you’ve chosen to copy hla and hlaparse to the "/usr/bin" or "/usr/local/bin" directory, chances are good you won’t have to change the path as it already contains these directories.
• Next, I added the following four lines to ".bashrc" (note that *NIX filenames beginning with a period don’t normally show up in directory listings unless you supply the "-a" option to ls):
hlalib=/usr/hla/hlalib export hlalib hlainc=/usr/hla/include export hlainc
These four lines define (and export) environment variables that HLA needs during compilation. Without these environment variables, HLA will probably complain about not being able to find include files, or the linker (ld) will complain about strange undefined symbols when you attempt to compile your programs. Note that this step is optional if you leave the library and include files installed in the /usr/hla directory subtree.
• Optionally, you can add the following two lines to the .bashrc file (but make sure you’ve created the /tmp directory if you do this):
hlatemp=/tmpHLA Reference Manual 5/24/10 Chapter 3
export hlatemp
After saving the ".bashrc" shell, you can tell *NIX to make the changes to the system by using the command:
source .bashrc
The problem is that I don't have any .bashrc in my Users/me/ directory so I guess its the plain bashrc file in /etc ?
except that file looks like:
# System-wide .bashrc file for interactive bash(1) shells.
if [ -z "$PS1" ]; then
return
fi
PS1='\h:\W \u\$ '
# Make bash check its window size after a process completes
shopt -s checkwinsize
and has nothing like
PATH=$DBROOT/bin:$DBROOT/pgm:$PATH
plus, its a readonly file, should I change permissions with chmod and modify it?
Hope somebody can give me some advice...
THANK YOU!
terminal-OTHER, Mac OS X (10.6.7), bash shell