From owner-freebsd-questions Wed Feb 20 13:45:29 2002 Delivered-To: freebsd-questions@freebsd.org Received: from ulixes.esc.ac.at (ulixes.esc.ac.at [193.170.216.34]) by hub.freebsd.org (Postfix) with ESMTP id DB13937B400 for ; Wed, 20 Feb 2002 13:45:22 -0800 (PST) Received: from ulixes.esc.ac.at (localhost.esc.ac.at [127.0.0.1]) by ulixes.esc.ac.at (8.12.2/8.12.2) with ESMTP id g1KLjKHr031839; Wed, 20 Feb 2002 22:45:20 +0100 (CET) (envelope-from flo@ulixes.esc.ac.at) Received: (from flo@localhost) by ulixes.esc.ac.at (8.12.2/8.12.2/Submit) id g1KLjKrT031838; Wed, 20 Feb 2002 22:45:20 +0100 (CET) (envelope-from flo) Date: Wed, 20 Feb 2002 22:45:20 +0100 From: Florian Nigsch To: "B.K. DeLong" , freebsd-questions@freebsd.org Subject: Re: BASH programming question Message-ID: <20020220224520.A31541@nigsch.com> References: <5.1.0.14.2.20020220160637.02763050@pop.earthlink.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5.1i In-Reply-To: <5.1.0.14.2.20020220160637.02763050@pop.earthlink.net>; from bkdelong@pobox.com on Wed, Feb 20, 2002 at 04:17:57PM -0500 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 Hi! Try if [ $IP != "" ]; then ... As far as I know there is no <> operator supported by test. 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 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message