I have this:
# 2009-09-28
Item,Value,Value Percent,Conversions,Conversion Percent,URL,Clicky URL
"http://online.foo.com/static_html_files/jsframe.html",120,98.4,,,"http://online.foo.com/static_html_files/jsframe.html",""
"http://europe.foo.com/static_html_files/jsframe.html",1,0.8,,,"http://europe.foo.com/static_html_files/jsframe.html",""
# 2009-09-27
Item,Value,Value Percent,Conversions,Conversion Percent,URL,Clicky URL
"http://online.foo.com/static_html_files/jsframe.html",65,97,,,"http://online.foo.com/static_html_files/jsframe.html",""
# 2009-09-26
Item,Value,Value Percent,Conversions,Conversion Percent,URL,Clicky URL
"http://online.foo.com/static_html_files/jsframe.html",73,100,,,"http://online.foo.com/static_html_files/jsframe.html",""
# 2009-09-25
Item,Value,Value Percent,Conversions,Conversion Percent,URL,Clicky URL
"http://online.foo.com/static_html_files/jsframe.htmlfoo",144,100,,,"http://online.foo.com/static_html_files/jsframe.htmlfoo",""
# 2009-09-24
Item,Value,Value Percent,Conversions,Conversion Percent,URL,Clicky URL
"http://online.foo.com/static_html_files/jsframe.htmlfoo",159,99.4,,,"http://online.foo.com/static_html_files/jsframe.htmlfoo",""
"http://europe.foo.com/static_html_files/jsframe.htmlfoo",1,0.6,,,"http://europe.foo.com/static_html_files/jsframe.htmlfoo",""
and I want
2009-09-28 http://online.foo.com/static_html_files/jsframe.html 120
2009-09-28 http://europe.foo.com/static_html_files/jsframe.html 1
2009-09-27 http://online.foo.com/static_html_files/jsframe.html 65
The date that is after the # at the beginning of every line that follows it unless that line is empty or starts with Item. If the line starts with #, that's a date line and so switch to the new date and continue. Does that make sense?
I think it can be done with grep, but I am not a Jedi in that art.
--
Lorin Rivers
Mosasaur: Killer Technical Marketing <http://www.mosasaur.com>
<mailto:lrivers@mosasaur.com>
512/203.3198 (m)
--
You received this message because you are subscribed to the
"BBEdit Talk" discussion group on Google Groups.
To post to this group, send email to bbedit@googlegroups.com
To unsubscribe from this group, send email to
bbedit+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/bbedit?hl=en
If you have a feature request or would like to report a problem,
please email "support@barebones.com" rather than posting to the group.