Everybody OK it I post this and the python script on the wiki?
David F. Skoll wrote: > Daniel A Graham wrote: >> Not perl, but here's a python script to do the job: > >> remind = re.compile(r'^\s*rem\s.*$', re.IGNORECASE) > > The original poster wanted lines cut at the final %. So if you have: > > REM Monday MSG I hate %"Mondays%" % > > then Remind would be fed: > > REM Monday MSG I hate %"Mondays%" > > So here's a Perl one-liner: > > perl -ne 'print "$1\n" if /^\s*(REM.*)%/i or /^\s*(REM.*)/i' > > And a shell script: > > #!/bin/sh > perl -ne 'print "$1\n" if /^\s*(REM.*)%/i or /^\s*(REM.*)/i' $1 | remind - > > (I am 100% certain a true Perl guru can combine the regexes, but > I'm too lazy.) > > Regards, > > David. > _______________________________________________ > Remind-fans mailing list > [email protected] > http://lists.whatexit.org/mailman/listinfo/remind-fans _______________________________________________ Remind-fans mailing list [email protected] http://lists.whatexit.org/mailman/listinfo/remind-fans
