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?
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
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I changed to:
BEGIN { found = 0; }
/------/ { found = 1; }
{ if (found == 0) print }
END {}
Thanks!
BEGIN { found = 0; }
/------/ { found = 1; }
{ if (found == 0) print }
END {}
Thanks!
ASKER