Howto Simplify/Factorize Exports in .bash_profile


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Howto Simplify/Factorize Exports in .bash_profile
# 1  
Old 03-29-2006
Howto Simplify/Factorize Exports in .bash_profile

Dear expert,

My .bash_profile contain the following lines:

Code:
# User specific environment and startup programs
export CFLAGS="-I $HOME/.libstree/include"; 
export LDFLAGS="-L $HOME/.libstree/lib";
export LD_LIBRARY_PATH=/home/ewijaya/MyBioTool/libstree-0.4.2/lib:${LD_LIBRARY_PATH}

export CFLAGS="-I $HOME/.gsl/include"; 
export LDFLAGS="-L $HOME/.gsl/lib"; 
export LD_LIBRARY_PATH=/home/ewijaya/MyBioTool/gsl-1.7/lib:${LD_LIBRARY_PATH}

export CFLAGS="-I $HOME/.swish/include"; 
export LDFLAGS="-L $HOME/.swish/lib"; 
export LD_LIBRARY_PATH=/home/ewijaya/.swish/lib:${LD_LIBRARY_PATH}

I wonder how can I simplify those multiple: CFLAGS,LDFLAGS,and LD_LIBRARY_PATH?

Second question is that, why after doing "printenv" the CFLAGS,LDFLAGS are only shown for .swish? namely the last block of export for .swish?

Code:
$ printenv | grep 'CFLAGS'

Gives only:
CFLAGS=-I /home/ewijaya/.swish/include

and

Code:
$ printenv | grep 'LDFLAGS'

Gives only:
LDFLAGS=-L /home/ewijaya/.swish/lib

But it's okay for LD_LIBRARY_PATH:
Code:
$ printenv | grep 'LD_LIBRARY'
LD_LIBRARY_PATH=/home/ewijaya/.swish/lib:/home/ewijaya/MyBioTool/gsl-1.7/lib:/home/ewijaya/MyBioTool/libstree-0.4.2/lib:

Thanks so much beforehand.
# 2  
Old 03-29-2006
Please read our rules which state:

(4) Do not 'bump up' questions if they are not answered promptly. No duplicate or cross-posting and do not report a post where your goal is to get an answer more quickly.

I will close this duplicate thread. Your original thread is here.
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How to simplify this code?

hi guys need your help...how to simplify this script... for i in `cat dmp.txt` do model=$i more $model | grep : | cut -d ":" -f 2- | grep : | grep -v "=" > temp1 more $model | grep / | cut -d ":" -f 2- > temp2 more $model | grep = | cut -d ":" -f 2- > temp3 more... (2 Replies)
Discussion started by: zulabc
2 Replies

2. UNIX for Dummies Questions & Answers

NFS not showing under /etc/fstab nor /etc/exports

Hi guys, I was asked to perform the following: On server usdfslpsap04 following NFS mounts should be disabled usdfslpwmt3:/u01/opt/wm6_data/ebiz_edi/CALIBER_data 50412232 13369544 34481872 28% /u01/opt/wm6_data/ebiz_edi/CALIBER_data usauxoradw:/DWH/Transfer/current... (1 Reply)
Discussion started by: 300zxmuro
1 Replies

3. SCO

Problem with nfs exports between 5.0.5 and 5.0.7

Hello everyone! I have two systems: an old SCO 5.0.5 Openserver (here's the uname -a output): /# uname -a SCO_SV munixela 3.2 5.0.5 i386 And a SCO 5.0.7 OpenServer (uname -a output): /# uname -a SCO_SV catedral 3.2 5.0.7 i386 I exported a Filesystem from the 5.0.7 machine, using the... (13 Replies)
Discussion started by: superchivo
13 Replies

4. AIX

AIX Exports file

Why can I not add more than 1 filesystem to the /etc/exports file and export them via smitty, or command line? I have tried, I stopped the NFS daemons, edited the /etc/exports file by hand, saved it, then re-started NFS, but it only still exports the first line in the exports file. ... (4 Replies)
Discussion started by: mrmurdock
4 Replies

5. Programming

Listing function exports from object file

Is it possible to view all the functions exported by a given object file? "dump -tv" comes the closest, but what exactly am I looking for to determine whether the symbol exists in the object file? Essentially, I have a library that requires a call to "xdr_sizeof" and the compile is failing... (5 Replies)
Discussion started by: DreamWarrior
5 Replies

6. Shell Programming and Scripting

How can I simplify the script

Hi all, How can I simplify following script, Logic is to find two strings (strings are case sensitive) from a file. if ; then if ; then Group=`echo $1_hostname` fi fi Please help me on this. Regards Sudhish s. kumar (8 Replies)
Discussion started by: sudhish
8 Replies

7. Shell Programming and Scripting

Howto Simplify Multiple Exports in .bash_profile

Dear expert, My .bash_profile contain the following lines: # User specific environment and startup programs export CFLAGS="-I $HOME/.libstree/include"; export LDFLAGS="-L $HOME/.libstree/lib"; export LD_LIBRARY_PATH=/home/ewijaya/MyBioTool/libstree-0.4.2/lib:${LD_LIBRARY_PATH} export... (1 Reply)
Discussion started by: monkfan
1 Replies

8. UNIX for Dummies Questions & Answers

Factorize some rows in a column

HI! I have a file containing a column of numbers with 69 rows. I won't to factorize row 20 to 50 with 1.03 How do I do that? (I'm a beginner as you easily can understand) (5 Replies)
Discussion started by: frebo
5 Replies

9. UNIX for Advanced & Expert Users

nfs exports and netmask option

Setting up nfs on a redhat ES 4 gives me following issue that i can't explain. My nfs was working perfect whith following /etc/exports on the server /home/test/nfstest 198.9.200.227(rw,sync,no_root_squash) But after a powerloss and restart of the server it only works with the... (0 Replies)
Discussion started by: progressdll
0 Replies

10. UNIX for Dummies Questions & Answers

/etc/exports

i have the following entry in /etc/exports which is /opt/hpxt. i am on hpux b11.0.0 questions 1) is /hpxt in the same physical machine? got confused by the meaning of export. (1 Reply)
Discussion started by: yls177
1 Replies
Login or Register to Ask a Question