Search and print between two words/patterns, Operating System

Assignment Help:
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.

Related Discussions:- Search and print between two words/patterns

Define swapping, Define swapping. A process requires being in memory to...

Define swapping. A process requires being in memory to be executed. Though a process can be swapped temporarily out of memory to a backing store and then brought back into memo

Explain the request/response interface, Explain the Request/Response Interf...

Explain the Request/Response Interface   Many issues are involved in providing a procedural interface for client functions to interact with server components. First off, since

Explain about spooling, Q. Explain about Spooling? Acronym for simu...

Q. Explain about Spooling? Acronym for simultaneous peripheral operations on line. Spooling denotes to putting jobs in a buffer, a special area in memory or on a disk where

Is data in a file access sequentially or randomly, Q. Give an instance of ...

Q. Give an instance of an application in which data in a file should be accessed in the following order: a. Sequentially b. Randomly Answer: a. Print the content of

#title.paging, explain hierarchical,hashed and inverted paging

explain hierarchical,hashed and inverted paging

GIS, 1. The City of Boston needs to be about 2 acres of green space per 1,0...

1. The City of Boston needs to be about 2 acres of green space per 1,000 persons. You have been hired as the GIS expert by an independent consulting company to determine where the

Explain benefits of time-sharing system, Under what circumstances would a ...

Under what circumstances would a user be better off using a time-sharing system, rather than a personal computer or single-user workstation? When there are some other users, th

Keeping track of free memory, How do we keep track of where the free pieces...

How do we keep track of where the free pieces of memory are? One idea is to maintain a set of linked-lists of free space; each linked-list will store free chunks of some given size

Define i/o and cpu bursts, Define I/O and CPU Bursts   Applications typ...

Define I/O and CPU Bursts   Applications typically to through cycle of CPU bursts and Input/output bursts. Since the CPU sits idle during I/O operations, efficiency is improved

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd