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.

Post navigation
(previous post)
(next post)
| | | | .

{0 Comments .. you can add one }

Leave a comment