[Remind-Fans] pdb > reminders problems galore

yard-ape at telus.net yard-ape at telus.net
Sat Sep 4 12:09:49 EDT 2004


I'm not familiar with the file format we're dealing with here,
but as long as it's structured, you should be able to automate the
conversion---with a more or less complex script. My guess is that
we've only got one-line records, and input from only a few programs,
so it shouldn't be too hard.

If, for example, the troublesome shawdowplan entries alwas have
the format

'\[Link [A-Z\-0-9^ ]\]'

Then pipe it through this script for all those entries:

#!/bin/sh

sed -e '
/\[Link [A-Z\-0-9^ ]\]/s/\[/["["]/g
'

If the shadowplan entries are only one of several using '[' and ']'
that you need to correct, and only the DateBk4 entries are the proper
ones, then, assuming the DateBk4 entries always have an expression like

'date(20[0-9]\{2\},[0-9]\{1,2\},[0-9]\{1,2\})'

use:

#!/bin/sh

sed -e '
/date(20[0-9]\{2\},[0-9]\{1,2\},[0-9]\{1,2\})/!s/\[/["["]/g
'

Even if you need to read up more on regexes and sed, and study the
file for bad patterns, the investment will pay off. But heavens,
don't do it manually! Ugh!

-Derek

David F. Skoll wrote:

>On Sat, 4 Sep 2004, David J Patrick wrote:
>
>  
>
>>[(trigdate()>=date(2003,8,7))&& (!isomitted(trigdate()))]
>>    
>>
>
>That looks intentional.
>
>  
>
>>[Link A-005F-080002]
>>    
>>
>
>That one's wrong.
>
>So a simple "sed" won't work. :-(
>
>--
>David.
>_______________________________________________
>Remind-fans mailing list
>Remind-fans at whatexit.org
>http://whatexit.org/mailman/listinfo/remind-fans
>
>  
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.roaringpenguin.com/pipermail/remind-fans/attachments/20040904/7b6e006c/attachment.htm>


More information about the Remind-fans mailing list