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

What are the operations that can be performed on a directory, What are the ...

What are the operations that can be performed on a directory? The operations that can be performed on a directory are Search for a file Create a file Delete a

Describe paging technique used in unix systems, Describe paging technique u...

Describe paging technique used in UNIX systems. When a process begin in UNIX, not every its memory pages are read in from the disk at once. In its place, the kernel loads into

Virtualization, What factors are involved in choosing the host operating sy...

What factors are involved in choosing the host operating system?

Why do organisations need a structure, Problem 1: (a) The grouping of o...

Problem 1: (a) The grouping of organisational activities (usually into ‘departments' or larger ‘divisions') can be done in different ways. Outline 7 criteria which can be used

Explain c-scan , LOOK o Like SCAN except stops moving inwards (or outw...

LOOK o Like SCAN except stops moving inwards (or outwards) when no more requests in that direction exist. C-SCAN (circular scan) o Moves inwards servicing requests u

Explain briefly the working of semaphore with example ?, Explain briefly th...

Explain briefly the working of semaphore with example ? The E.W. Dijkstra (1965) abstracted the key idea of mutual exclusion in his concepts of semaphores. Definition A s

Define deadlock prevention, Define deadlock prevention. Deadlock preve...

Define deadlock prevention. Deadlock prevention is a set of process for ensuring that at least one of the four essential conditions like mutual exclusion, hold and wait, no pr

Kernel mode and user mode function, Q. How does the distinction among kerne...

Q. How does the distinction among kernel mode and user mode function as a rudimentary form of protection (security) system? Answer: The distinction among kernel mode and user m

Define dynamic loading, Define dynamic loading. To obtain better memory...

Define dynamic loading. To obtain better memory-space utilization dynamic loading is used. With dynamic loading, a routine is not loaded until it is called. All routines are ke

Write a note on the usage of semaphores, Write a note on the usage of semap...

Write a note on the usage of semaphores. Semaphore is a synchronization tool and it is a variable having integer values. It is accessed only by two standard atomic operations w

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