Not perl, but here's a python script to do the job:
-------------------snip---------------------
#!/usr/bin/env python
# encoding: utf-8

import sys
import os, re

remind = re.compile(r'^\s*rem\s.*$', re.IGNORECASE)

fo = open(sys.argv[1],'r')
lines = fo.readlines()
fo.close()

for line in lines:
        # print line
        if remind.match(line):
                print "%s" % line.strip()

-------------------snip---------------------

If you name it remlines.py then the usage would be

$ remlines.py <path to your file including rem lines>

The relevant lines will be written to stdout.

-Dan
_______________________________________________
Remind-fans mailing list
[email protected]
http://lists.whatexit.org/mailman/listinfo/remind-fans

Reply via email to