Hello:
I butchered a shell script together, but my script kung-fu is 5 years old and all I've used for 5 years are for i loops. I hope that some perl guru can do in 5 minutes what takes me 5 weeks, so I am asking for help.
I have a simple script using "grep -A 2 'string' /path/to/file" but after importing my data into it (if's a FF plugin called ReminderFox), the rows are "re-ordered"
script now outputs: (source ics file is
'US Holidays')
- SUMMARY:Washington's Birthday
DTSTART;VALUE=DATE:20090216
DTEND;VALUE=DATE:20090217
But grep'ing with the same command on my backup file, I get this kind of output:
- SUMMARY:Technical Support Specialist
UID:1281092384117-979283602
DTSTART:20100812T085900''
In simplest terms, my request is...
I'd like to have these fields from any ics file that has them:
SUMMARY:
DTSTART;VALUE=DATE:
DTEND;VALUE=DATE:
(and echo a newline)
and if possible convert DTSTART|DTEND data...
from it's current format of "+%Y%m%d" to "+%h %m %Y"
This is NOT homework.
Bash = GNU bash, version 4.0.38 | Awk = GNU Awk 3.1.7
Grep = GNU grep 2.6.3 | perl = 5.10.0
I hope this is clear.
Thank you for your time.