[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[ale] regex question?



grep 03/[0123][0-9]/02

Will locate any date in the month of 03 for year 02.

Robert L. Harris wrote:
> 
> Got one just annoying me.  It's going to be something simple I'm sure.
>>From a ksh command line I'm executing a set of commands:
> 
> /usr/local/bin/doreport | grep 03/1[34]/02
> 
> obviously to limit it based on date.  This works great when the date is
> 13 and 14, but what's the best way to do the grep for something like the
> 19 and 20 or even 31 and 01?  I tried [13|14] and that doesn't work, I'd
> rather keep it short and not have an egrep '03/14/02|03/15/02' as that
> can be a bit ugly for some juniors I'm trying to teach.
> 
> Robert
> 
> 
> :wq!
> ---------------------------------------------------------------------------
> Robert L. Harris                |  Micros~1 :  
> Senior System Engineer          |    For when quality, reliability 
>   at RnD Consulting             |      and security just aren't
>                                 \_       that important!
> DISCLAIMER:
>       These are MY OPINIONS ALONE.  I speak for no-one else.
> FYI:
>  perl -e 'print $i=pack(c5,(41*2),sqrt(7056),(unpack(c,H)-2),oct(115),10);'
> 
> 
> ---
> This message has been sent through the ALE general discussion list.
> See http://www.ale.org/mailing-lists.shtml for more info. Problems should be 
> sent to listmaster at ale dot org.
> 
> 
> 


-- 
Until later: Geoffrey		esoteric at 3times25.net

I didn't have to buy my radio from a specific company to listen
to FM, why doesn't that apply to the Internet (anymore...)?


---
This message has been sent through the ALE general discussion list.
See http://www.ale.org/mailing-lists.shtml for more info. Problems should be 
sent to listmaster at ale dot org.