#!/bin/sh #---------------------------------------------------------------------------- # /usr/local/bin/clrhome - clear home # # Creation: 2001-09-29 fm # Last Update: $Id: clrhome,v 1.2 2004/08/30 18:27:57 max Exp $ # # Copyright (c) 2001-2011 the eisfair team, team(at)eisfair(dot)org # # usage: # # clrhome [--tty|--html|--file] # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. #---------------------------------------------------------------------------- if /usr/bin/tty -s <&1 then mode='tty' else if [ -n "$GATEWAY_INTERFACE" ] then mode='html' else mode='file' fi fi while [ 1 ] do case "$1" in --tty|-tty) mode=tty; shift;; --html|-html) mode=html; shift;; --file|-file) mode=file; shift;; *) break;; esac done case $mode in tty) echo -e "\033[H\033[2J\c" ;; html) echo "
" ;; file) echo -e "\n----------------------------------------------------------------------\n" ;; esac