bash_logoutの作成 - RとLinuxと...

RとLinuxと...


bash_logoutの作成

Linuxの備忘録

こんなところでどうでしょうか

# ~/.bash_logout: executed by bash(1) when login shell exits.

if [ -f "/home/ishida/Document/svn.sh" ]; then
 /home/ishida/Document/svn.sh commit >/dev/null 2>&1
fi

# http://www.mekou.com/~tsuyoshi/writing/NikkeiBP/200411.txt
MOUNT_POINT=/mnt/landisk
if [ "`df |grep $MOUNT_POINT`" != "" ] && \
   [ "`who |grep  ^$USER |wc |awk '{print $1}'`" == 1 ]; then
    umount  $MOUNT_POINT >/dev/null 2>&1
fi

# 以下はもともと書き込まれていた処理
# when leaving the console clear the screen to increase privacy

if [ "$SHLVL" = 1 ]; then
   [ -x /usr/bin/clear_console ] && /usr/bin/clear_console -q
fi
 
Link: Linuxの備忘録(2536d)
Last-modified: 2008-12-20 (土) 18:47:06 (3648d)