#!/bin/bash if [ -n "$1" ] && [ -f ~/mail/$1 ]; then cd ~/mail if [ "${TERM}" = "xterm" -o "${TERM}" = "xterm-color" ]; then echo -ne "\033]0;${1} folder\007" fi mesg n pine -f $1 mesg y if [ "${TERM}" = "xterm" -o "${TERM}" = "xterm-color" ]; then if [ -n "${XTITLE}" ]; then echo -ne "\033]0;${XTITLE}\007" else echo -ne "\033]0;${USER}@${SHOSTNAME} ${PWD}\007" | sed -e "s@${HOME}@\~@" fi fi else echo Missing mail folder $1 fi