Results 1 to 2 of 2
OK I am at a loss... What's happening is with the below ~/.bashrc in place I can't rsync... I get the error about "is your shell clean" If I remove ...
- 03-14-2008 #1
OK experts, please help me with this .bashrc related error...
OK I am at a loss... What's happening is with the below ~/.bashrc in place I can't rsync... I get the error about "is your shell clean" If I remove the ~/.bashrc I can rsync fine...

I put below a copy of my /etc/profile too incase the two are conflicting??
Can someone please look at it and tell me if they see something that might cause that?
## Kevin's ~/.bashrc
# COMMENTS
#################################################
# To temporarily bypass an alias, we preceed the command with a \
# EG: the ls command is aliased, but to use the normal ls command you would
# type \ls
#WELCOME
#################################################
echo -ne "${BLUE}" "Howdy. Today is, "; date
echo -e "${BLUE}"; cal ;
echo -ne "${BLUE}";
echo -ne "${BLUE}Sysinfo:";uptime ;echo ""
# FUNCTIONS
#################################################
function ff { find . -name $@ -print; }
function reboot { shutdown -r now; }
function shutdown { shutdown -h now; }
# SPECIAL FUNCTIONS
#################################################
netinfo ()
{
echo "--------------- Network Information ---------------"
/sbin/ifconfig | awk /'inet addr/ {print $2}'
echo ""
/sbin/ifconfig | awk /'Bcast/ {print $3}'
echo ""
/sbin/ifconfig | awk /'inet addr/ {print $4}'
# /sbin/ifconfig | awk /'HWaddr/ {print $4,$5}'
echo "---------------------------------------------------"
}
# Basic options
################################################## #####
# the prompt information
PS1="\[\033[1;32m\]\h\033[0;30m\]:\[\033[1;36m\]\u\033[0;30m\]:\033[1;31m\]\$PWD\[\033[0;30m\]\n$ "
export PS1
# Define a few Colours
BLACK='\e[0;30m'
BLUE='\e[0;34m'
GREEN='\e[0;32m'
CYAN='\e[0;36m'
RED='\e[0;31m'
PURPLE='\e[0;35m'
BROWN='\e[0;33m'
LIGHTGRAY='\e[0;37m'
DARKGRAY='\e[1;30m'
LIGHTBLUE='\e[1;34m'
LIGHTGREEN='\e[1;32m'
LIGHTCYAN='\e[1;36m'
LIGHTRED='\e[1;31m'
LIGHTPURPLE='\e[1;35m'
YELLOW='\e[1;33m'
WHITE='\e[1;37m'
NC='\e[0m' # No Color
# HISTORY
declare -x HISTFILE=~/.bash_history
declare -x HISTCONTROL=ignoredups
declare -x HISTFILESIZE=100000
declare -x HISTSIZE=100000
# don't put duplicate lines in the history.
export HISTCONTROL=ignoredups
# and ignore same sucessive entries.
export HISTCONTROL=ignoreboth
# leave some commands out of history log
export HISTIGNORE="&
?:[ ]*:clear:exit:logout"
# Locale and editor
export EDITOR=gedit
export BROWSER="firefox '%s' &"
# Paths
PATH=$PATH:${HOME}/bin:/sbin:/usr/sbin
export PATH=$PATH:/usr/local/bin
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib
export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/local/lib/pkgconfig
# Functions
extract () {
if [ -f $1 ] ; then
case $1 in
*.tar.bz2) tar xjf $1 ;;
*.tar.gz) tar xzf $1 ;;
*.bz2) bunzip2 $1 ;;
*.rar) rar x $1 ;;
*.gz) gunzip $1 ;;
*.tar) tar xf $1 ;;
*.tbz2) tar xjf $1 ;;
*.tgz) tar xzf $1 ;;
*.zip) unzip $1 ;;
*.Z) uncompress $1 ;;
*) echo "'$1' cannot be extracted via extract()" ;;
esac
else
echo "'$1' is not a valid file"
fi
}
ziprm () {
if [ -f $1 ] ; then
unzip $1
rm $1
else
echo "Need a valid zipfile"
fi
}
psgrep() {
if [ ! -z $1 ] ; then
echo "Grepping for processes matching $1..."
ps aux | grep $1 | grep -v grep
else
echo "!! Need name to grep for"
fi
}
###############
### aliases ###
###############
# Alias definitions.
# You may want to put all your additions into a separate file like
# ~/.bash_aliases, instead of adding them here directly.
# Aliases
alias ssh='ssh (deleted user name to protect the innocent)@$1'
alias df='df -h'
alias home='cd /home/$USER'
alias duck='du -skc * | sort -rn'
alias open='gnome-open'
alias bashrc='sudo gedit ~/.bashrc'
alias suvim='sudo vim'
alias root='sudo su-'
alias runlevel='sudo /sbin/init'
alias grep='grep --color=auto'
alias rm='mv --target-directory=$HOME/.Trash/'
alias cp='cp -vi'
alias mv='mv -vi'
alias h="history|grep "
alias f="find . |grep "
alias p="ps aux |grep "
alias clean='rm -f "#"* "."*~ *~ *.bak *.dvi *.aux *.log'
alias ..='cd ..'
alias ...='cd ../..'
alias ....='cd ../../..'
alias .....='cd ../../../..'
alias lls='ls -l -h -g -F --color=auto'
alias l='ls -CF --color=auto'
alias lc='ls -aCF --color=auto'
alias lh='ls -lah --color=auto' # human readable (sizes) long and all
alias lss='ls -shAxSr --color=auto' # sort by size
alias lt='ls -lAtrh --color=auto' # sort by date and human readable
alias lm='ls -al |more --color=auto' # pipe through 'more'
alias ls='ls --color=auto'
alias dir='ls --color=auto --format=vertical'
alias ldir='ls --color=auto --format=long'
# chmod and permissions commands
alias mx='chmod a+x'
alias 000='chmod 000'
alias 644='chmod 644'
alias 755='chmod 755'
alias perm='stat --printf "%a %n \n "' # requires a file name e.g. perm file
# system info
alias cpuu="ps -e -o pcpu,cpu,nice,state,cputime,args --sort pcpu | sed '/^ 0.0 /d'"
alias memu='ps -e -o rss=,args= | sort -b -k1,1n | pr -TW$COLUMNS'
# network
alias net1='watch --interval=2 "sudo netstat -apn -l -A inet"'
alias net2='watch --interval=2 "sudo netstat -anp --inet --inet6"'
alias net3='sudo lsof -i'
alias net4='watch --interval=2 "sudo netstat -p -e --inet --numeric-hosts"'
alias net5='watch --interval=2 "sudo netstat -tulpan"'
alias net6='sudo netstat -tulpan'
alias net7='watch --interval=2 "sudo netstat -utapen"'
alias net8='watch --interval=2 "sudo netstat -ano -l -A inet"'
alias netl='sudo nmap -sT -O localhost' # more here http://www.redhat.com/docs/manuals/l...ver-ports.html
alias ping='ping -c 10'
alias whois='whois -H'
# SCREENSHOTS
alias screenshot='import -window root ~/Desktop/`date +%Y%m%d%H%M`.png'/etc/profile
# /etc/profile: system-wide .profile file for the Bourne shell (sh(1))
# and Bourne compatible shells (bash(1), ksh(1), ash(1), ...).
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
if [ -f ~/.bash_aliases ]; then
. ~/.bash_aliases
fi
if [ -f ~/.bash_completion ]; then
. ~/.bash_completion
fi
# /etc/profile
# This is for mail
EMAIL=${USER}@erau.edu
export EMAIL
RSYNC_RSH=ssh
export RSYNC_RSH
BLOCKSIZE=1024
export BLOCKSIZE
USER_UMASK=077
export USER_UMASK
# All users get $BASE_PATH in their $PATH
BASE_PATH=/bin:/usr/bin:/sbin:/usr/sbin
# Check for extra directories and add to $BASE_PATH if found
if [ -d /usr/local/bin ]; then
BASE_PATH=${BASE_PATH}:/usr/local/bin
fi
export BASE_PATH
# This $ROOT_PATH is what only r00t gets
ROOT_PATH=/bin:/usr/bin:/sbin:/usr/sbin
# Check for extra directories and add if found
if [ -d /usr/local/sbin ]; then
ROOT_PATH=${ROOT_PATH}:/usr/local/sbin
fi
export ROOT_PATH
# This is what root doesn't get but everyone else does
USER_PATH=.
if [ -d ${HOME}/bin ]; then
USER_PATH=${USER_PATH}:${HOME}/bin
fi
export USER_PATH
# Set umask and PATH, this gets done again in shrc.
# We do it here for non-interactive login shells (eg xdm logins) that
# source /etc/profile.
# It also means we can loose ~/.bash_profile
if [ `id -u` = "0" ]; then
umask ${ROOT_UMASK}
PATH=${BASE_PATH}:${ROOT_PATH}
else
umask ${USER_UMASK}
PATH=${BASE_PATH}:${USER_PATH}
fi
export PATH
# end /etc/profile
- 03-14-2008 #2
Did you run across this when you were Googling for a solution?


Reply With Quote