--- /dev/null
+export COWPATH="/usr/local/git/cowfiles:/usr/local/git/cowsay-files/cows:/usr/local/share/localcows:/usr/local/share/cows"
+
+function lolcatcowsayfortune {
+
+ # randomly pick between cowsay and cowthink
+ declare -a cowsay_types=("cowsay" "cowthink")
+ cowsay_type=${cowsay_types[ $RANDOM % 2 ]}
+
+ # randomly pick an eye type
+ declare -a eye_types=("-b" "-d" "-g" "-p" "-s" "-t" "-w" "-y")
+ eye_type=${eye_types[ $RANDOM % 8 ]}
+
+ NUMOFCOWS=`cowsay -l | grep -v "Cow files in" | tail -n +2 | wc -w`
+ WHICHCOW=$((RANDOM%$NUMOFCOWS+1))
+ THISCOW=`cowsay -l | tail -n +2 | sed -e 's/\ /\'$'\n/g' | sed $WHICHCOW'q;d'`
+
+ #echo "Selected cow: ${THISCOW}, from ${WHICHCOW}"
+ fortune -s | $cowsay_type $eye_type -f $THISCOW -n | lolcat
+}
+
+# fortune, with cowsay and random cows, and lolcat; here instead of .bashrc
+# to prevent remote eommands from failing due to output being generated
+if [ -e /usr/local/share/cows ] && [ -x /usr/local/bin/cowsay ] && [ -x /usr/local/bin/fortune ] && [ -x /usr/local/bin/lolcat ]; then
+ lolcatcowsayfortune
+fi
--- /dev/null
+[[ -s ~/.bashrc ]] && source ~/.bashrc
+
+export COWPATH="/usr/local/git/cowfiles:/usr/local/git/cowsay-files/cows:/usr/local/share/localcows:/usr/local/share/cows"
+
+function lolcatcowsayfortune {
+
+ # randomly pick between cowsay and cowthink
+ declare -a cowsay_types=("cowsay" "cowthink")
+ cowsay_type=${cowsay_types[ $RANDOM % 2 ]}
+
+ # randomly pick an eye type
+ declare -a eye_types=("-b" "-d" "-g" "-p" "-s" "-t" "-w" "-y")
+ eye_type=${eye_types[ $RANDOM % 8 ]}
+
+ NUMOFCOWS=`cowsay -l | grep -v "Cow files in" | tail -n +2 | wc -w`
+ WHICHCOW=$((RANDOM%$NUMOFCOWS+1))
+ THISCOW=`cowsay -l | tail -n +2 | sed -e 's/\ /\'$'\n/g' | sed $WHICHCOW'q;d'`
+
+ #echo "Selected cow: ${THISCOW}, from ${WHICHCOW}"
+ fortune -s | $cowsay_type $eye_type -f $THISCOW -n | lolcat
+}
+
+# fortune, with cowsay and random cows, and lolcat; here instead of .bashrc
+# to prevent remote eommands from failing due to output being generated
+if [ -e /usr/local/share/cows ] && [ -x /usr/local/bin/cowsay ] && [ -x /usr/local/bin/fortune ] && [ -x /usr/local/bin/lolcat ]; then
+ lolcatcowsayfortune
+fi