setting a path in bash shell


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting setting a path in bash shell
# 1  
Old 03-21-2010
setting a path in bash shell

Hello all,

Sorry if the question if stupid but I have no big experience with programming.
I am trying to set a path to be used in a makefile.in, for installation of a Fortran code. The makefile.in contains the string

$(CODE_NAME)

Now, when I type in the bash shell

export CODE_NAME=/Users/laura/code_folder

the compiling starts regularly. In order to automatize the process, I copied the line above in the .bash_profile (I have done this in the past for aliases and it worked). However in this case it does not work. Anybody can tell me what's wrong?

Thanks in advance!
# 2  
Old 03-21-2010
Quote:
Originally Posted by laura74
I copied the line above in the .bash_profile
What if you export your variable in the .bashrc instead of .bash_profile?
# 3  
Old 03-21-2010
I have tried, but it doesn't work...
# 4  
Old 03-21-2010
edit the makefile -
Code:
CODE_PATH := /Users/laura/code_folder

# 5  
Old 03-21-2010
I had tried that too, and in the past (with old make files) it had worked. But now it doesn't work anymore. I was actually wondering why!
# 6  
Old 03-21-2010
Back to square one.

What OS are you on? Are you using the implmentation of make that comes with that OS or is it an add-on (like GNU make)
# 7  
Old 03-21-2010
I'm using Mac OS S 10.5.8. I think I'm using the implementation of make that comes with that OS (in the bash shell I just type make install)
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How to do user-preset login to Bash shell then automate path modification?

How do a user login with full user-environment preset to Bash shell then automatically do path modification with few script codes, either on command-line or put it in a script file. what i tried: bash --login -c PATH="/ANewPath:${PATH}" bash --login -c 'PATH="/ANewPath:${PATH}"; export PATH'... (2 Replies)
Discussion started by: abdulbadii
2 Replies

2. Shell Programming and Scripting

Moving files from parent path to multiple child path using bash in efficient way

Hi All, Can you please provide some pointers to move files from Base path to multiple paths in efficient way.Folder Structure is already created. /Path/AdminUser/User1/1111/Reports/aaa.txt to /Path/User1/1111/Reports/aaa.txt /Path/AdminUser/User1/2222/Reports/bbb.txt to... (6 Replies)
Discussion started by: karthikgv417
6 Replies

3. Shell Programming and Scripting

Setting class path

hi , can anybody help me to chage the class path in unix server.. what are the files need to update .... (2 Replies)
Discussion started by: Madhu Siddula
2 Replies

4. Shell Programming and Scripting

Setting the path permanently using shell script

I'm trying to set the path permanently through a shell script. (/opt/quest/bin:/usr/bin/lab to /.profile.) I tired using echo option like below but it doesn't work. Please suggest me the right way to do so. echo "PATH=$PATH:/opt/quest/bin:/usr/bin/lab" >> /.profile (6 Replies)
Discussion started by: pjeedu2247
6 Replies

5. UNIX for Dummies Questions & Answers

Is there any $PATH default setting?

This is a very newbie's question: I was trying to add a new version of the same command "blastn", but the old command always shows up first. which blastn /usr/local/bin/blastnThe two versions of the same command "blastn" are located in: which -a blastn /usr/local/bin/blastn... (5 Replies)
Discussion started by: yifangt
5 Replies

6. Solaris

Setting PATH - Vanishes

Hi , I new to solaris. I want to set path variable . Eg: JAVA_HOME. When i do this, #JAVA_HOME=/usr/jdk/jdk1.6 #export JAVA_HOME #echo $JAVA_HOME /usr/jdk/jdk1.6 Then its ok. When i toggle to bourne shell or if i log off or restart. then JAVA_HOME is echoed blank. How to set... (4 Replies)
Discussion started by: gnanagurus
4 Replies

7. Shell Programming and Scripting

Error in setting PATH variable in bash shell

Hi, I am new to shell scripting.I tried adding an entry to the path variable like below export PATH=$PATH:/opt/xxx/bin But am getting an error invalid identifier /opt/xxx/bin Can someone tell me the error above and correct me . Thanks and Regards, Padmini (2 Replies)
Discussion started by: padmisri
2 Replies

8. Shell Programming and Scripting

Setting path

Hi all, I have a java command in a shell script. When i m executing the command from the prompt its working fine. But when i paste the same command in a shell script and execute the shell script it says path not found. Please help. (5 Replies)
Discussion started by: radhika03
5 Replies

9. UNIX for Dummies Questions & Answers

Setting path for GCC?

Dear all, I have downloaded the latest version of gcc --- gcc-3.3.1.tar.gz from gnu.org. My Linux distribution is Mandrake 9.0. This was how I installed it: su - passwrd: mkdir /usr/local/src cd /usr/local/src gunzip /tmp/gcc-3.3.1.tar.gz #where I downloaded the file tar xvf... (2 Replies)
Discussion started by: HOUSCOUS
2 Replies
Login or Register to Ask a Question