Easiest improvement is to do it in perl
my @months = qw(
    January February March April May June
    July August September October November December
);
if( grep /$whatsthemonth/, @months ) {
}

(I can think of lots of other ways to encode it, but that one meets the
stated aim.

--Don Ellis


On Tue, Feb 10, 2009 at 2:36 PM, Scott Granneman <[email protected]>wrote:

>
> is there a shorter way to do this:
>
> if [ $whatsthemonth = January -o $whatsthemonth = February -o
> $whatsthemonth = March -o $whatsthemonth = April -o $whatsthemonth =
> May -o $whatsthemonth = June -o $whatsthemonth = July -o
> $whatsthemonth = August -o $whatsthemonth = September -o
> $whatsthemonth = October -o $whatsthemonth = November -o
> $whatsthemonth = December ]
>
> than what i did?
>
> tks!
>
> scott
> --
> R. Scott Granneman
> [email protected] ~ www.granneman.com
> Full list of publications @ http://www.granneman.com/publications
>   My new book: Linux Phrasebook @ http://www.granneman.com/books
>
> "The reason I believe in a large tax cut is because it's what I
> believe."
>       ---George W. Bush, 18 December 2000
>

--~--~---------~--~----~------------~-------~--~----~
Central West End Linux Users Group (via Google Groups)
Main page: http://www.cwelug.org
To post: [email protected]
To subscribe: [email protected]
To unsubscribe: [email protected]
More options: http://groups.google.com/group/cwelug
-~----------~----~----~----~------~----~------~--~---

Reply via email to