From owner-freebsd-questions Wed Feb 20 14: 7:55 2002 Delivered-To: freebsd-questions@freebsd.org Received: from brain-stream.com (brain-stream.com [209.95.107.206]) by hub.freebsd.org (Postfix) with ESMTP id DCD9C37B404 for ; Wed, 20 Feb 2002 14:07:50 -0800 (PST) Received: from pantalaimon.pobox.com (h00609708e398.ne.mediaone.net [24.128.187.79]) by brain-stream.com (8.9.3/8.9.3) with ESMTP id OAA13109; Wed, 20 Feb 2002 14:07:33 -0800 (PST) Message-Id: <5.1.0.14.2.20020220165911.01e189a0@pop.earthlink.net> X-Sender: bkdelong@pop.earthlink.net X-Mailer: QUALCOMM Windows Eudora Version 5.1 Date: Wed, 20 Feb 2002 17:00:03 -0500 To: Florian Nigsch , freebsd-questions@freebsd.org From: "B.K. DeLong" Subject: Re: BASH programming question In-Reply-To: <20020220224520.A31541@nigsch.com> References: <5.1.0.14.2.20020220160637.02763050@pop.earthlink.net> <5.1.0.14.2.20020220160637.02763050@pop.earthlink.net> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG At 10:45 PM 02/20/2002 +0100, Florian Nigsch wrote: >if [ $IP != "" ]; then >... > >As far as I know there is no <> operator supported by test. Nope. Still "newip.sh: [: too many arguments" Hmmmm. >On Wed, Feb 20, 2002 at 04:17:57PM -0500, B.K. DeLong wrote: > > #!/usr/local/bin/bash -x > > ifconfig | grep "inet " | cut -f2 -d" " | grep 24. > /.newip > > IP='diff /.newip /.currentip' > > > > if [ $IP <> null ]; then > > cat /.newip > /.currentip; > > mail -s "New IP" bkdelong@pobox.com < /.currentip; > > echo "A New IP has been found" > > exit 0 > > fi >---end quoted text--- > >-- > >--- >Florian Nigsch >http://flo.nigsch.com/ >PGP key: http://flo.nigsch.com/fnigsch.asc -- B.K. DeLong bkdelong@pobox.com 617.877.3271 http://www.brain-stream.com Play. http://www.the-leaky-cauldron.org Potter. http://www.attrition.org Security. http://www.artemisiabotanicals.com Herb. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message