From owner-freebsd-questions@FreeBSD.ORG Tue Jul 13 23:57:46 2010 Return-Path: Delivered-To: questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C40A7106566C for ; Tue, 13 Jul 2010 23:57:46 +0000 (UTC) (envelope-from perrin@apotheon.com) Received: from cpoproxy3-pub.bluehost.com (cpoproxy3-pub.bluehost.com [67.222.54.6]) by mx1.freebsd.org (Postfix) with SMTP id 91F9D8FC08 for ; Tue, 13 Jul 2010 23:57:46 +0000 (UTC) Received: (qmail 23890 invoked by uid 0); 13 Jul 2010 23:57:46 -0000 Received: from unknown (HELO box543.bluehost.com) (74.220.219.143) by cpoproxy3.bluehost.com with SMTP; 13 Jul 2010 23:57:45 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=default; d=apotheon.com; h=Date:From:To:Subject:Message-ID:Mail-Followup-To:References:Mime-Version:Content-Type:Content-Disposition:In-Reply-To:User-Agent:X-Identified-User; b=TETCZtYkuB3N0MUL/gIQqP1LnqFYUqVeaH75GO31oOUSauNqgc9GSYiddsJC85aPyn+KAsPhNN0hiYtUSDtGG1HHqstwK9T2QXwAI88Bxx8ri0P3vkcUXcR1B/ydXNRe; Received: from c-24-8-180-234.hsd1.co.comcast.net ([24.8.180.234] helo=kukaburra.hydra) by box543.bluehost.com with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.69) (envelope-from ) id 1OYpM8-00081u-Cg for questions@freebsd.org; Tue, 13 Jul 2010 17:57:45 -0600 Received: by kukaburra.hydra (sSMTP sendmail emulation); Tue, 13 Jul 2010 17:56:23 -0600 Date: Tue, 13 Jul 2010 17:56:23 -0600 From: Chad Perrin To: "questions@freebsd.org" Message-ID: <20100713235623.GD35912@guilt.hydra> Mail-Followup-To: "questions@freebsd.org" References: <4C3B26B4.1000208@comclark.com> <867hl0ems5.fsf@gmail.com> <4C3BBA8A.3020305@comclark.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="IDYEmSnFhs3mNXr+" Content-Disposition: inline In-Reply-To: <4C3BBA8A.3020305@comclark.com> User-Agent: Mutt/1.4.2.3i X-Identified-User: {2737:box543.bluehost.com:apotheon:apotheon.org} {sentby:smtp auth 24.8.180.234 authed with ren@apotheon.org} Cc: Subject: Re: .sh check for sufix g or m on size field 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: Tue, 13 Jul 2010 23:57:46 -0000 --IDYEmSnFhs3mNXr+ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Jul 13, 2010 at 08:59:54AM +0800, Aiza wrote: >=20 > This is real close but it allows a numeric value through as valid which= =20 > is not a valid condition. The $size value has to be suffixed with g or m= =20 > to be valid. A numeric value only or a numeric value suffixed with=20 > anything else than m or g is invalid. What exactly is your desired behavior for input containing something other than a series of numbers and either a 'g' or an 'm'? What *should* happen if you get '25gm' as input, since the preceding example was not sufficient for your needs? Please clarify your requirements. --=20 Chad Perrin [ original content licensed OWL: http://owl.apotheon.org ] --IDYEmSnFhs3mNXr+ Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.14 (FreeBSD) iEYEARECAAYFAkw8/ScACgkQ9mn/Pj01uKWo0wCeJwzUJNWpMx99loaM4k/TncHa bW8An2USLGN1tHrUT0U7lQ3TsGjnDks6 =2/rd -----END PGP SIGNATURE----- --IDYEmSnFhs3mNXr+--