From owner-freebsd-questions@FreeBSD.ORG Thu Jun 24 02:44:39 2010 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B67E81065670 for ; Thu, 24 Jun 2010 02:44:39 +0000 (UTC) (envelope-from rwmaillists@googlemail.com) Received: from mail-fx0-f54.google.com (mail-fx0-f54.google.com [209.85.161.54]) by mx1.freebsd.org (Postfix) with ESMTP id 410598FC08 for ; Thu, 24 Jun 2010 02:44:38 +0000 (UTC) Received: by fxm7 with SMTP id 7so4057261fxm.13 for ; Wed, 23 Jun 2010 19:44:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:received:received:date:from:to:subject :message-id:in-reply-to:references:x-mailer:mime-version :content-type:content-transfer-encoding; bh=DEm+jzZ1HI7iP3zwiU7yHwLLNHXLrBZLphnD05UK79o=; b=EAET7r9VyNCyxZ/43QBvpPUdi5sf+wy0aWnzmhF4ARDfkMu9HJK4W3vNTbwkNxkt2u L/YtF56Yst5GHZRRdNwzB141OVlXGRFrqnZ05UOTL5zoDblqxMGoOgVkbnjAHIPDxXrU pRuoPqSANnVaovQ+OM4gDgappEsY/MejGt24k= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=date:from:to:subject:message-id:in-reply-to:references:x-mailer :mime-version:content-type:content-transfer-encoding; b=lu0I/OI075ojjOX9dx8rJJd6UzglJv7mqw037ptE7m6nQckjbty+Xg+NO0ptaQe/Ko 00nirSaH0NRv7BC70jKHfyQQb+KVXHbjFQXy0SCkVgyqI0cLrDVB5tSpPnV+Vf0yQLh9 QssJXSqNinrFo/D3egqknO/xlPBBPrFdQAxRw= Received: by 10.223.68.13 with SMTP id t13mr8535885fai.69.1277347477969; Wed, 23 Jun 2010 19:44:37 -0700 (PDT) Received: from gumby.homeunix.com (bb-87-81-140-128.ukonline.co.uk [87.81.140.128]) by mx.google.com with ESMTPS id o19sm34029797fal.23.2010.06.23.19.44.36 (version=SSLv3 cipher=RC4-MD5); Wed, 23 Jun 2010 19:44:37 -0700 (PDT) Date: Thu, 24 Jun 2010 03:44:34 +0100 From: RW To: freebsd-questions@freebsd.org Message-ID: <20100624034434.7a6c2895@gumby.homeunix.com> In-Reply-To: <20100624013755.GA5009@gothschlampen.com> References: <4C22B3D7.6070102@comclark.com> <20100624013755.GA5009@gothschlampen.com> X-Mailer: Claws Mail 3.7.6 (GTK+ 2.20.1; i386-portbld-freebsd8.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: .sh check for numeric content X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 Jun 2010 02:44:39 -0000 On Thu, 24 Jun 2010 03:37:55 +0200 Thomas wrote: > On Thu, Jun 24, 2010 at 09:24:39AM +0800, Aiza wrote: > > Hello, > > > Receiving a variable from the command line that is suppose > > to contain numeric values. > > > > How do I code a test to verify the content is numeric? > > http://www.google.com/search?q=shell+test+if+variable+numeric > > First link => > http://www.unix.com/shell-programming-scripting/46276-check-variable-if-its-non-numeric.html > > Gosh, Google is full of answers these days.. I'd suggest looking a bit further down the list since the quoted first link is patently wrong.