# /home/root/bin/trapdtail logfile="/usr/OV/log/trapd.log" clear if [ "$1" = "wer" ] ; then for lumpi in `ps -ef | grep tail | grep -v grep | awk '{ print $6 }'` do who | grep -E "$lumpi " done exit 0 fi if [ "$1" = "" -o "$1" = "all" ] ; then if [ "$1" = "" ] ; then # tail -f $logfile|grep -vE "dded\.|eleted\."|cut -c25-512 # tail -f $logfile|grep -vE "dded\.|eleted\." tail -f $logfile|cut -c25-34,40-55,67-512 fi if [ "$1" = "all" ] ; then tail -f $logfile|cut -c25-34,40-55,67-512 fi exit 0 fi numberoflines=`echo $1 | bc` if [ $numberoflines -lt 1 ] ; then numberoflines=11 fi if [ $numberoflines -gt 22 ] ; then tail -n$numberoflines $logfile|cut -c18-34,40-55,67-512|pg tail -f $logfile|cut -c25-34,40-55,67-512 else tail -n$numberoflines $logfile|cut -c18-34,40-55,67-512 tail -f $logfile|cut -c25-34,40-55,67-512 fi