Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- cat /Users/jwand/Documents/work.ics | sed /^X-LOTUS.*/d | sed '
- /^END:VCALENDAR$/ {
- N
- /END:VCALENDAR.*BEGIN:VCALENDAR/ {
- /END:VCALENDAR.*BEGIN:VCALENDAR/D
- P
- D
- }
- } ' > /Users/jwand/Documents/work2.ics
- ## input:
- BEGIN:VCALENDAR
- # some stuff
- END:VCALENDAR
- BEGIN:VCALENDAR
- # more stuff
- END:VCALENDAR
- ## goal
- to get rid of all the instances of:
- END:VCALENDAR
- BEGIN:VCALENDAR
- in the middle of the file, without touching the ones at the very start or end
Add Comment
Please, Sign In to add comment