Bash

Category: Open Source — redwards @ 4:26 pm

I have recently been doing a fair bit of work on some DNS/DHCP appliances that are based on a version of RHEL, as a result I have started to use the Bash shell alot more. In the past on Solaris and HP-UX I have resorted to using KSH and had configured my .profile to pretty much work how I needed.

Although if I really wanted I am sure I could carry on using KSH and update the .profile to work with the RHEL boxes, however how boring. I decided to use Bash (various reason) I thought that I should probably get it to work exactly how I want, so here is my journy.

########### Source global definitions ################
if [ -f /etc/bashrc ]; then
. /etc/bashrc
fi
############# set the prompt ##########################
# uncomment out 1 and only one below....
# this is hostname and time
#PS1="\h-(\@): "
# this is hostname and history number
#PS1="\h-(\!)# "
# this is hostname and current working directory
PS1="\h-(\w)# "
# this is hostname and shortened current working directory
#PS1="\h-(\W)# "
############# path manipulation #######################
# add ~/bin to the path, cwd as well
PATH="$PATH:$HOME/bin:./"
################# env variables #######################
# make sure that you change this to your username
MAIL="/afs/<a href="http://umbc.edu/users/u/s/username/Mail/inbox" target="_blank">umbc.edu/users/u/s/username/Mail/inbox</a>"
export PATH
unset USERNAME
###### User specific aliases and functions ############
Comments (0)

Name: (required)

E-mail: (required)

Website: