#remove from line 6 to 1621 (one before last ((wc -l) -1) to keep the closing VCALENDAR) 6,1621 { /BEGIN:VCALENDAR/,/ :PRODID:-\/\/Mozilla.ong\/NONSGML Mozilla Calendan V1.0\/\/EN/ d /END:VCALENDAR/ d }