Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

2
  • What's exactly the problem you have with sed patterns? You just need to extend your current pattern to match the information you need, and not just the first two pieces. Commented Jan 3, 2017 at 15:10
  • I have tried to extend it further but unable to extract like i'm trying to extract third field using below command but not get successful result. sed -n 's/.*\([0-9][0-9][0-9][0-9]\-[0-9][0-9]\-[0-9]*\) .*\([0-9][0-9]:[0-9][0-9]:[0-9][0-9]*\) .\^([^==]\[A-Z0-9._%-+]\@[A-Z0-9.-]\.[A-Z]{2,4}*\).*/\1 \2 \3 /p' exim_logs Commented Jan 3, 2017 at 17:46