From owner-freebsd-hackers Wed Nov 22 16:39:20 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from ego.mind.net (ego.mind.net [206.99.66.9]) by hub.freebsd.org (Postfix) with ESMTP id DE1ED37B4CF for ; Wed, 22 Nov 2000 16:39:16 -0800 (PST) Received: from takhus.dyn.mind.net (AFN-Dyn-63151108225.pc.ashlandfiber.net [63.151.108.225]) by ego.mind.net (8.9.3/8.9.3) with ESMTP id QAA00366; Wed, 22 Nov 2000 16:39:15 -0800 Received: from localhost (fleisher@localhost) by takhus.dyn.mind.net (8.11.1/8.11.1) with ESMTP id eAN0dAu07232; Wed, 22 Nov 2000 16:39:10 -0800 (PST) (envelope-from takhus@takhus.mind.net) X-Authentication-Warning: takhus.dyn.mind.net: fleisher owned process doing -bs Date: Wed, 22 Nov 2000 16:39:09 -0800 (PST) From: Tony Fleisher X-Sender: fleisher@takhus.dyn.mind.net To: petro Cc: FreeBSD-hackers@FreeBSD.ORG Subject: Re: Shell script In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Your PATH variable (line 8) needs to include /bin, where both tee and [ are located. Tony. On Thu, 23 Nov 2000, petro wrote: > 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 > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message