My file is:
abc
123
xyz
abc
675
xyz
And I want to extract:
abc
123
xyz
(123 could be anything, the point is I want the first occurrence)
I tried using this:
sed -n '/abc/,/xyz/p' filename
but this is giving me all the instances. How could I get just the first one?