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

Deadlock resoloution technique, justify the role played by the operating sy...

justify the role played by the operating system in managing the process to avoid deadlock

Explain process scheduling, Explain Process scheduling Process scheduli...

Explain Process scheduling Process scheduling consists of the subsequent sub-functions: 1.      Scheduling : Selects the process to be implement next on the CPU 2.      D

Describe the differences among short-term and medium-term, Describe the dif...

Describe the differences among short-term, medium-term, and long-term scheduling.   Short-term (CPU scheduler)-selects from jobs in memory those jobs that are ready to execu

Plot a function for value of heights, The performance of a file system depe...

The performance of a file system depends upon the cache hit rate (fraction of blocks found in the cache). If it takes 1 msec to satisfy a request from the cache, but 40 msec to sat

What are the various page replacement algorithms, What are the various page...

What are the various page replacement algorithms used for page replacement? FIFO page replacement Optimal page replacement LRU page replacement LRU approximat

search tree generated by hill-climbing search, Show the search tree genera...

Show the search tree generated by Hill-Climbing search (text figure 4.2, page 122; or Local Search lecture, slide 6) for each of the two heuristics (a) and (b) applied to the follo

List ways to share directories in operating system, List ways to share file...

List ways to share files among directories in operating systems. a. Copy file from one account into another. b. Link directory entry of "copied" file to directory entry of o

Describe the purpose of the open and close operations, Q. Describe the pur...

Q. Describe the purpose of the open() and close() operations. Answer: The open() operation notifies the system that the named file is about to become active. The c

Define the dosexecpgm function used in the os/2, Define the DosExecPgm Func...

Define the DosExecPgm Functions used in the OS/2 DosExecPgm (objBuffer, objLen, flags, cmdLine, env, &resultCode, execName) DosExecPgm function is designed to load an execut

How does a program execution take place in multiprogramming?, How does a pr...

How does a program execution take place in multiprogramming? While the processor is dealing with a number of programs, the sequence with which programs are implemented will de

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