Hello, I want to parse a vcal file with awk, and later import the specific output file into excel. I want everything on one line.
-------- file testcal.ics -------------
BEGIN:VCALENDAR
PRODID:-//WebCalendar-v1.0.5
VERSION:2.0
METHOD:PUBLISH
BEGIN:VEVENT
UID:20090407T123456Z-9766476-2805@192.168.17.150
SUMMARY:"Troubleshoot LRV Database Performance "
DESCRIPTION:Find out why some SQL Sciptjobs from a specific User are very
imperformant
CLASS:PUBLIC
ATTENDEE;ROLE=OWNER;STATUS=CONFIRMED
evnull User <
devnull@devnull.zero>
DTSTART:20090323T090000Z
DTSTAMP:20090407T123456Z
DTEND:20090323T110000Z
END:VEVENT
BEGIN:VEVENT
UID:20090407T123456Z-6411416-2805@192.168.17.150
SUMMARY:Workout Sugestions for the Streams Tivoli Monitoring
DESCRIPTION:Read several Oracle Streams Monitoring Documentations. Workout
what to Monitor in the Oracle Streams ZEETOOL Environment
CLASS:PUBLIC
ATTENDEE;ROLE=OWNER;STATUS=CONFIRMED
evnull User <
devnull@devnull.zero>
DTSTART:20090323T110000Z
DTSTAMP:20090407T123456Z
DTEND:20090323T170000Z
END:VEVENT
-------------SNIP-----------------------
awk '/^SUMMARY/{mysummary=$0}
/^DESCRIPTION/{mydescription=$0}
/^DTSTART/{mydtstart=$0}
/^DTEND/{mydtend=$0}
{print(mysummary mydescription mydtstart mydtend)}' testcal.ics
How to correctly assign, and print those variables on one line.
brgds sdohn