what if we need the portion from a text based on some keyword.
For eg. My file is like below,
------------------------------------------------
Order=[
1
2
3
4
5
Order=[
6
7
8
9
10
Order=[
11
12
13
14
15
Order=[
------------------------------------------------
Now i want the middle portion where i found EO427849242. I tried with sed but it does not give me the desired result.
I used the command,
sed -n ''/Sandy Order/,/Sandy Order/p'' Filename
and it gives me the all the portion in the file from Start=Sandy Order and end=Sandy Order
When I use the below command,
sed -n ''/Sandy Order/,/Sandy Order/p'' Filename | grep EO427849242
it only gave me the line
Order=[
But what i need is
-----
Order=[
11
12
13
14
15
-----
Can anyone please help me on this. It will be really helpful.