I want to split a file containg HTTP response into two files: one containing only HTTP headers, and one containg the body of a message. For this I need to split a file into
You can extract the first part of your file (HTTP headers) with:
awk '{if($0=="")exit;print}' myFile
and the second part (HTTP body) with:
awk '{if(body)print;if($0=="")body=1}' myFile