split header and body

Hewlett-packard Pavilion dv6-2150us note...
July 30, 2010 at 07:19:32
Specs: Linux
Hello,

I have large file with a header (the header is on multiple rows and number of rows is not static). End of the header is marked by word ENDOFHEADER and end-of-line-character) something like

my header row1
dsfdsfdfdsf
dsfdsfds
sdfdsffdf vdfv ENDOFHEADER
MYFIRSTRECORD|XXX|ddd|
...
...


Is there any easy way to remove this portion of the file?

Thank you


See More: split header and body

Report •

#1
July 30, 2010 at 09:15:20
download sed for windows then do this

sed '/header/,/ENDOFHEADER/d' file

GNU win32 packages | Gawk


Report •

#2
July 30, 2010 at 17:34:20
Thank you for quick response. Works like a charm

Report •
Related Solutions


Ask Question