retrieving headers / comment blocks
Posted
by AnC
on Super User
See other posts from Super User
or by AnC
Published on 2009-09-06T15:24:57Z
Indexed on
2010/04/19
13:44 UTC
Read the original article
Hit count: 351
I have a number of log files that look like this:
/*
header
arbitrary number of lines
*/
blah blah
blah blah
Using simple Bash commands (preferably sed, not awk), how would I retrieve only the header lines (ideally including the comment markers)?
I've RTFM and tried googling, also found some hints, but not enough to get me started.
Thanks!
© Super User or respective owner