#!/bin/sh #---------------------------------------------------------------------------- # /usr/local/bin/clrhome - clear home # # Copyright (c) 2004 Frank Meyer # # Creation: 29.09.20001 fm # Last Update: $Id$ # # 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 [ "$GATEWAY_INTERFACE" != "" ] then mode='html' else mode='file' fi fi while [ 1 ] do case "$1" in -tty) mode=tty; shift;; -html) mode=html; shift;; -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