数值计算

星期三, 五月 24, 2006

一个较好的.bash_profile文件

在Linux系统下为.bash_profile(/bin/bash),HP-UX下为.profile(/bin/sh):



# .bash_profile



# Get the aliases and functions

if [ -f ~/.bashrc ]; then

. ~/.bashrc

fi



# User specific environment and startup programs



PS1='\u@\h:$PWD> '

PS1='\u@\h>'

alias cp='cp -ipr'

alias mv='mv -i'

alias rm='rm -i'

alias ls='ls -F --color=tty'

alias ll='ls -Flrt --color=tty'



unset USERNAME



# set PATH so it includes user's private bin if it exists

# PATH=~/bin:"${PATH}"

if [ -d ~/bin ] ; then

if [ -z "${PATH}" ] ; then

PATH=~/bin

else

PATH=~/bin:"${PATH}"

fi

export PATH

fi



# do the same with MANPATH

# MANPATH=~/man:"${MANPATH}"

if [ -d ~/man ]; then

if [ -z "${MANPATH}" ] ; then

MANPATH=~/man:$(man -w)

else

MANPATH=~/man:"${MANPATH}"

fi

export MANPATH

fi



# do the same with LD_LIBRARY_PATH

if [ -d ~/lib ]; then

if [ -z "${LD_LIBRARY_PATH}" ]; then

LD_LIBRARY_PATH=~/lib

else

LD_LIBRARY_PATH=~/lib:"${LD_LIBRARY_PATH}"

fi

export LD_LIBRARY_PATH

fi

0 Comments:

发表评论

<< Home