bu_local.sh
#!/bin/bash
#
#CVS: $Header$
shopt -s -o nounset
#global declarations
backup_path="/home/rvd/Documenten/BU"
date=$(date +"%d-%b-%Y")
declare -A FILES=(
[bashrc]=~/.bashrc
[bash_history]=~/.bash_history
[nanorc]=~/.nanorc
[fstab]=/etc/fstab
)
#sanity checks
#main script
umask 077
for i in "${!FILES[@]}";
do
cp ${FILES[$i]} $backup_path/$i-$date ;
done
#cleanup
exit 0