[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Rereading .bash_profile



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 mavis rj]$ echo ${testan[ $RANDOM % 13]}
II
[rj 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?




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]