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*

7
  • 1
    (1) Are the > characters really part of your data?  (2) Will “expected” and “actual” always be on the same line?  (3) What have you tried? (Try searching this site.  We get lots of questions like this.) Commented Sep 21, 2018 at 5:01
  • > this is part of data. and many regex can also be there. no, expected and actual can be in different lines and in between them also can be many lines. Commented Sep 21, 2018 at 6:06
  • 1
    Can you use grep ? Commented Sep 21, 2018 at 6:37
  • You mention you "have to do it without awk", and as a result try sed. Are other tools permitted? Commented Sep 21, 2018 at 12:59
  • grep or sed can be used... i used this sed -n '/Started.*'$1'/,/Started.*'$2'/p' filename. is it usable ? Commented Sep 23, 2018 at 8:17