Date: Thu, 23 Nov 2000 02:30:54 +0200 (EET) From: petro <petro@She.wertep.com> To: FreeBSD-hackers@freebsd.org Subject: Shell script Message-ID: <Pine.BSF.4.21.0011230228470.59745-100000@She.wertep.com>
next in thread | raw e-mail | index | archive | help
I have such script..... # more trafdump #!/bin/sh - # trafdump Copyright (c)1993 CAD lab # # dump all records to /var/tmp/trafd.$iface # # usage: trafdump interfaces... # PATH=/usr/local/bin WHERE_PID=/var/run/trafd.ed0 LOG_FILE=/var/log/traffic.log if [ $# = 0 ]; then echo trafdump - dump tcp/udp network data traffic echo usage: trafdump interfaces... exit 1 fi for iface in $*; do PID_FILE=$WHERE_PID$iface if [ -f $PID_FILE ]; then kill -HUP `cat $PID_FILE` if [ $? = 0 ]; then echo `date +"%b %e %H:%M:%S"` `hostname -s` trafdump: \ '('$iface')' signaling to dump >> $LOG_FILE fi else echo error: $PID_FILE not found | tee -a $LOG_FILE fi done # but when I try to start # ./trafdump -ied0 I receive three errors.... I can't understand whereis the errors..... [: not found [: not found tee: not found To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.21.0011230228470.59745-100000>