Register
It is currently Wed Oct 22, 2014 3:36 am

sigificance of ${BASH-no} in /etc/profile


All times are UTC - 6 hours


Post new topic Reply to topic  [ 2 posts ] 
Author Message
 PostPosted: Tue Jan 20, 2009 9:37 am   

Joined: Mon Jan 19, 2009 10:01 pm
Posts: 2
I am using MacOSX. In my /etc/profile file there is the following if statement:

Code:
if [ "${BASH-no}" != "no" ]; then
        [ -r /etc/bashrc ] && . /etc/bashrc
fi


I am guessing that BASH-no is an environmental variable that instructs whether to execute a bashrc file. How does this environmental variable get set??

Thanks!!


Top
 Profile  
 PostPosted: Fri Jan 23, 2009 3:58 pm   

Joined: Mon Jan 19, 2009 10:01 pm
Posts: 2
I found an explanation for this on the following page:

http://kaneda.bohater.net/faq/abs-guide ... ution.html

Default parameters can be assigned as follows:

${parameter-default}


Top
 Profile  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: No registered users and 5 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  


BashScripts | Promote Your Page Too
Powered by phpBB © 2011 phpBB Group
© 2003 - 2011 USA LINUX USERS GROUP