I'm facing an issue with mails. I need to get all messages between 2 people:
[email protected] and [email protected].
The file:
From: [email protected]
to: [email protected]
<body of the message1>
From: [email protected]
to: [email protected]
<body of the message1>
From: [email protected]
to: [email protected]
<body of the message1>
From: [email protected]
to: [email protected]
<body of the message1>
From: [email protected]
to: [email protected]
<body of the message1>
I tried to use the following sed:
sed -n "/From: [Ss]omebody1/,/From: /p" inputfile > test.txt
As a result I got all mails from somebody1 to test.txt file.
Question is: What should be the structre of sed to get only mails between somebody1 and person?