.sh check for sufix g or m on size field

Chad Perrin perrin at apotheon.com
Tue Jul 13 23:57:46 UTC 2010

On Tue, Jul 13, 2010 at 08:59:54AM +0800, Aiza wrote:
> This is real close but it allows a numeric value through as valid which 
> is not a valid condition. The $size value has to be suffixed with g or m 
> to be valid. A numeric value only or a numeric value suffixed with 
> 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.

Chad Perrin [ original content licensed OWL: http://owl.apotheon.org ]
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-questions/attachments/20100713/45794be3/attachment.pgp

More information about the freebsd-questions mailing list