Re: case statement question again...

1997-11-16 Thread Mark W. Eichin
>>[10-31]) SearchStr="$Month $Day";; That means "a single character in the set 1, 0 through 3, and 1", so it will match any of 0 1 2 3 and nothing else. >># [12][0-9]) SearchStr="$Month $Day";; >># 30 | 31 ) Day=02; SearchStr="$Month 9";; That's more like it; the [12][0-9]

Re: case statement question again...

1997-11-07 Thread john
Oliver Elphick writes: > On the other hand, this does not properly handle invalid day/month > combinations, such as 31 February. Do you handle that somewhere else? Use the 'date' command. For example: date +%D --date '1/1/97 +60days' returns: 03/02/97 Like most GNU utilities,

Re: case statement question again...

1997-11-06 Thread Oliver Elphick
David Oswald wrote: >Hello all - I have a KSH script question... > >sorry - the offending line is [10-31]) not [30-31]) What `[10-31]' says is: match any single character which is a 1, a character from 0 to 3 inclusive, or (another) 1. What you want is `[12][0-9]|3[0-1]'. On the other hand

case statement question again...

1997-11-06 Thread David Oswald
Hello all - I have a KSH script question... sorry - the offending line is [10-31]) not [30-31]) Can someone out there take a look at this script. I want to perform an operation based on the day of month. but the days (10 - 31) are giving me a problem. I would really like to keep this a one liner