Bash startup script in OSX

If you’re coming from Linux, and you’re looking for .bashrc in OSX, you’re not gonna find it–at the time I wrote this, the OSX is version 10.5.7 (Leopard)–you can find the bash initialization files in 2 places; in ~/.profile and /etc/profile.

Sample .profile

#
test -r /sw/bin/init.sh && . /sw/bin/init.sh
export TOMCAT_HOME=~/progtools/apache-tomcat-6.0.18
export CATALINA_HOME=$TOMCAT_HOME
export JYTHON_HOME=~/jython2.5.0

export PATH=$PATH:$TOMCAT_HOME/bin:$JYTHON_HOME:.
export PS1="_$ "
# this is how to comment on bash

This is my .profile file, it’s got some definitions where to find tomcat and jython executables. It also has some instructions on how to change the shell prompt, I don’t like very long shell prompts, I’d like to see just the dollar sign.

If you want to show appreciation for my efforts dear reader, you could buy me a tall hazel nut Americano ($2) via PayPal. Thanks
Navigation
(previous post)
(next post)
| | | | .

{2 Comments below .. you can add one }


Rémy Leclercq 4.6.2010at 10:52

Hi.
A Snow Leopard has been successfully attached to a Windows Server 2008 Active Directory domain. Works great.
We need to give the logged user the rights to use his personnal and shared AD drivers from within the AD server. I wrote a script that works perfectly. I would like to place this script somewhere in this Snow Leopard for been used automatically by any user logged in the machine. I don’t really know Mac world, but what I’m looking for is something like an autoexec (found in the MS world). Could you help?
Thank you.


Ted Heich 4.26.2010at 05:53

hi sorry, I just read this comment right now. Let me get back to you.

Leave a comment