Re: Stupid Dates

From: Nobody <nobody_at_nowhere.com>
Date: Mon, 25 Jan 1999 09:26:34 +1100
Message-ID: <36AB9E1A.62129F63_at_nowhere.com>


Glenn Baron wrote:
> On of our first tasks will be to search for and eliminate 'hard-coded'
> dates. '31-Dec-99' is an obvious candidate. Has anyone come across other
> similar foolishness ?
>
> The tools involved are :
>
> Sql
> PL/Sql
> Forms 3.0 and 4.5
> RPT
> Reportwriter 2.5
>

Glenn,

If you're running on a UNIX box, you might want to try using the tools there (UNIX is great for file processing):   egrep -c "Jan-|Feb-|Mar-|..." *.sql
(Don't take the ellipses literally, just carry on up to "...Nov-|Dec-").

If all your source is stored under one directory:

   find . -name '*.sql' -exec egrep -c "Jan-|Feb-..." {} /dev/null ';'

Obviously, these commands only do .sql files. Substitute .fmx or whatever to process different file types (or just use * for 'em all).

Your local UNIX gurus should be able to help you here. If you're running under NT (ugh!), I'd suggest buying the UNIX tools for it (I use MKS Toolkit).

AC. Received on Sun Jan 24 1999 - 23:26:34 CET

Original text of this message