On Thu, Jun 24, 2010 at 11:58:05AM +0100, RW wrote: > On Thu, 24 Jun 2010 05:19:53 +0200 > Thomas Keusch <[email protected]> wrote: > > > t...@eternity:~$ b=5 > > t...@eternity:~$ case "$b" in > > > [0-9] ) > > > echo numeric > > > ;; > > > * ) > > > echo alpha > > > ;; > > > esac > > numeric > > t...@eternity:~$ > > > > Works for me. > > Now try it with 10.
"10" is not valid input according to the problem/pseudocode (in the forum) that the above code was posted as a solution for. I tend to lend a hand, not the whole arm. If this doesn't solve the problem 100% for the OP, it surely enables him to quickly spot a solution (at least using the case statement) when he sees it, be it in results from researching via google, or in actual system scripts installed on his system. "Give a man a fish, ..." and all that. Don't get me wrong, I'm not at all against posting more complete solutions for more complex problems, but I do indeed think that lending a hand while still requiring a little thought and maybe tinkering on the side of the OP is what ultimately enables him (& newcomers in general) to learn and grow. Spoonfeeding solutions to trivial (and trivially researched questions) is counterproductive on so many levels. Regards, Thomas _______________________________________________ [email protected] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[email protected]"
