.sh check for numeric content

Jerry freebsd.user at seibercom.net
Thu Jun 24 21:51:27 UTC 2010


On Fri, 25 Jun 2010 05:17:17 +0800
Aiza <aiza21 at comclark.com> articulated:

> Jerry wrote:
> > On Thu, 24 Jun 2010 09:14:39 -0700
> > Chip Camden <sterling at camdensoftware.com> articulated:
> > 
> > [snip]
> > 
> >> That [[:digit:]] pattern only works if your shell supports POSIX
> >> character classes in the case statement.
> > 
> > I use Bash myself. I am not sure what other shells support this
> > context. In any case, I simply supplied a possible solution. I
> > leave it up to the OP to determine if it is suitable for his/her
> > environment.
> > 
> The subject clearly tells you what shell the o/p is using.

Actually, ".sh" does not appear to be a definitive declaration of the
scripting language.  However, if you deemed that to be a definitive
declaration for the scripting language the OP was using, then fine.

In any case, as I previously posted, it was left up to the OP to decide
if the proposed solution was suitable for their needs. After reading
all of the babble concerning what should be a relatively easy operation,
perhaps the OP might want to consider switching to Bash.

-- 
Jerry ✌
FreeBSD.user at seibercom.net

Disclaimer: off-list followups get on-list replies or get ignored.
Please do not ignore the Reply-To header.
__________________________________________________________________

Q: What's the difference between an Irish wedding and an Irish wake?
A: One more drunk.


More information about the freebsd-questions mailing list