Link to home
Start Free TrialLog in
Avatar of md168
md168

asked on

cut out lines in a text file?

I want to cut everything before the "-----" line in the following text file.  The size of the message will vary, so I can't cut a specific number of lines.  I have to cut everything before the "----"

Message id: 20189744, message kind: ApplicationMessage, user id: 2362135
spam message
spam message
spam message
spam message
spam message
------------------------------------------
+OK Message follows


How do I cut those lines, so I can grep them?
ASKER CERTIFIED SOLUTION
Avatar of bklyn2001
bklyn2001

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of md168
md168

ASKER

That is removing everything above the line.   I want to remove everything below the line.
Avatar of md168

ASKER

I changed to:

BEGIN { found = 0; }
  /------/ { found = 1; }
  { if (found == 0) print }
END {}


Thanks!