perl print if and tabs
Posted on 2006-11-15
I need to print out a couple of parts of a certain line.
I need to fine all lines that contian "YSanchez4" and "summary=" from lines such as this one
[15/Nov/2006:22:10:34 +0000] usxsl069 cshttpd: General Notice: (SSL) : POST: /storeevents.wcap?id=5ph5rn0o0p0e5qm0&calid=YSanchez4&dtstart=20020101T120000&dtend=20020101T010000&summary=New Year's Day&desc=&location=United States&icsClass=PUBLIC&isAllDay=1&categories=Holiday&charset=UTF-8&fmt-out=text/xml
I need to print out the summary= and the start and end time.
From this line I would get a print out of:
summary=New Year's Day 20020101T120000 20020101T010000
I'm getting the summary=... but when I try to add a few tabs and the start and end times I'm just getting a blank output,
can't figure out what I'm doing wrong here.
This is giving me the 1st part of what I need, need some help to get the start and end times.
perl -ne 'print "$1\n" if /(summary=.*)&desc=/'