1753768 Members
5300 Online
108799 Solutions
New Discussion юеВ

file clean up

 
SOLVED
Go to solution
andi_1
Frequent Advisor

file clean up

Hi guys,

I will have the following files coming in to me:
From test@yahoo.com Thu Jun 20 17:36:47 2002
Received: from odin.test.com ([1.1.1.1])
by odin.test.com (8.9.3/8.8.6) with ESMTP id RAA21885
for ; Thu, 20 Jun 2002 17:36:46 -0400 (EDT)
Received: from test.com (test.com [1.1.19.1])
by odin.test.com (8.9.3 (PHNE_18979)/8.9.3 SMKit7.01) with ESMTP id RAA09403
for ; Thu, 20 Jun 2002 17:27:43 -0400 (EDT)
Received: from web20416.mail.yahoo.com (web20404.mail.yahoo.com [66.163.169.92])
by test.com (Postfix) with SMTP id 36044804F57
for ; Mon, 24 Jun 2002 23:58:08 -0400 (EDT)
Message-ID: <20020620212412.44161.qmail@web20416.mail.yahoo.com>
Received: from [1.13.1.1] by web20404.mail.yahoo.com via HTTP; Thu, 20 Jun 2002 14:24:12 PDT
Date: Thu, 20 Jun 2002 14:24:12 -0700 (PDT)
From: test
Subject: Fwd: Test
To: test@test.com
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii

Dear ....

....
...

How can I remove everything prior to the word "Dear"....

Thank you!
2 REPLIES 2
James R. Ferguson
Acclaimed Contributor
Solution

Re: file clean up

Hi:

# sed '1,/^Content-Type/'d inputfile

Regard!

...JRF...
Rich Wright
Trusted Contributor

Re: file clean up

...or
sed -n '/^Dear/,$p' input_file