Linux: Fixing shell dotfiles (can correct minor issues with environment, PATH, etc.)
This script will look for dotfiles in the calling user's homedirectory, move any old ones out of the way, and reset them to the CAE defaults (in ~skel). This can be used to help remedy shell environments that aren't working correctly or missing PATH folders, etc.
To run this, simply copy this script into a file in your home directory, and then run `sh <script-name>`.
dotfiles=".bash_logout .bash_profile .bashrc .cshrc .login .logout"
echo "$dotfiles" | /usr/bin/tr ' ' '\n' | while read file; do
cd "$HOME" || exit
[ -e "$file" ] && /usr/bin/mv "$file" "$file.bak"
/usr/bin/cp "/filespace/s/skel/$file" "$file"