Rereading .bash_profile
Robert
kerplop at sbcglobal.net
Mon Oct 25 13:20:58 UTC 2004
I'm in the process of setting up a modest array (20-30 elements) for
BASH to pluck an element from when needed. Since the array won't change
for months once it's set up, I decided to put it in .bash_profile as I
have done with this test array, testan:
---------------------------------------------------------
# .bash_profile
# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
# User specific environment and startup programs
PATH=$PATH:$HOME/bin
export PATH
unset USERNAME
EDITOR=nano
export EDITOR
unset testan
declare -a testan
testan=("AA" "BB" "CC" "DD" "EE" "FF" "GG" "HH" "II" "JJ" "KK" "LL" "MM"
"NN")
export testan
---------------------------------------------------------------------
This does what I intended:
[rj at mavis rj]$ echo ${testan[ $RANDOM % 13]}
II
[rj at mavis rj]$
...except that constantly logging out and in while testing is a royal PITA.
What is the proper way cause .bash_profile to be re-examined?
More information about the fedora-list
mailing list