From owner-freebsd-questions@FreeBSD.ORG Thu Jun 24 18:36:27 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 24B5D106564A for ; Thu, 24 Jun 2010 18:36:27 +0000 (UTC) (envelope-from parv@pair.com) Received: from hrndva-omtalb.mail.rr.com (hrndva-omtalb.mail.rr.com [71.74.56.123]) by mx1.freebsd.org (Postfix) with ESMTP id CF1A88FC13 for ; Thu, 24 Jun 2010 18:36:26 +0000 (UTC) X-Authority-Analysis: v=1.1 cv=CRXretTPUtnO3YxfLBAQPdv2BUzevxUrVWgTW+Y28TY= c=1 sm=0 a=RWmFJ1rmKfAA:10 a=UBIxAjGgU1YA:10 a=kj9zAlcOel0A:10 a=64iin7ZDX+lUS8OB6KzQoA==:17 a=Ymsr-CWnAAAA:8 a=tHB4x23FF1AwFI97W9wA:9 a=xjUztwTl4C8du947itl-k2lY7p8A:4 a=CjuIK1q_8ugA:10 a=v2EulsF24l4A:10 a=q_AVK7wWYXBlsR9C:21 a=DjvlHwd8xbxnmBwo:21 a=64iin7ZDX+lUS8OB6KzQoA==:117 X-Cloudmark-Score: 0 X-Originating-IP: 98.150.184.250 Received: from [98.150.184.250] ([98.150.184.250:26998] helo=localhost.hawaii.res.rr.com) by hrndva-oedge04.mail.rr.com (envelope-from ) (ecelerity 2.2.2.39 r()) with ESMTP id A5/36-25793-9A5A32C4; Thu, 24 Jun 2010 18:36:26 +0000 Received: from holstein.holy.cow (parv [127.0.0.2]) by localhost.hawaii.res.rr.com (Postfix) with ESMTP id BF4355CB0; Thu, 24 Jun 2010 08:39:34 -1000 (HST) Received: (from parv@localhost) by holstein.holy.cow (8.14.3/8.14.3/Submit) id o5OIdXbv050460; Thu, 24 Jun 2010 08:39:33 -1000 (HST) (envelope-from parv@pair.com) X-Authentication-Warning: holstein.holy.cow: parv set sender to parv@pair.com using -f Date: Thu, 24 Jun 2010 08:39:33 -1000 From: Parv To: Carl Johnson , freebsd-questions@freebsd.org Message-ID: <20100624183933.GA50443@holstein.holy.cow> Mail-Followup-To: Carl Johnson , freebsd-questions@freebsd.org References: <4C22B3D7.6070102@comclark.com> <20100624033257.2D074BEA6@kev.msw.wpafb.af.mil> <87lja4mlme.fsf@cjlinux.localnet> <87hbksmk6y.fsf@cjlinux.localnet> <87d3vgmj1s.fsf@cjlinux.localnet> <20100624183407.GA49923@holstein.holy.cow> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20100624183407.GA49923@holstein.holy.cow> Cc: Subject: Re: check for numeric content in a shell script (FreeBSD sh) 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 18:36:27 -0000 in message <20100624183407.GA49923@holstein.holy.cow>, wrote parv@pair.com thusly... > > # Matches a number, either positive (without '+' sign) or > # negative, which is either a whole number; or a real number > # ending with decimal point, or a real number with or without > # leading digits before the decimal point. . ^ . ^ plural > ^ > -? > ( > [0-9] [.]? [0-9]* > | > [0-9]? [.] [0-9]+ . ^ . ^ oops Please change the immediately above regex portion to ... [0-9]* [.] [0-9]+ - parv > ) > $ --