I want to search a file for a string and then if the string is found I need the line that the string is on - but also the previous two lines from the file (that the pattern will not be found in)
This is on solaris
Can you help? (2 Replies)
hiii,
i have to write a shell script like this----
i have a huge log file name abc.log .i have to search for a pattern name "pattern",it may occur 1000 times in the log file,every time it finds the pattern it should display the 10 lines above the pattern.
I appericiate your help. (30 Replies)
Hi all,
I am trying to extract the values ( text between the xml tags) based on the Order Number.
here is the sample input
<?xml version="1.0" encoding="UTF-8"?>
<NJCustomer>
<Header>
<MessageIdentifier>Y504173382</MessageIdentifier>
... (13 Replies)
Hey folks!
I am new to shell-scripting, but I have a problem that I would like to solve using a script. I create very large html forms, used for randomized trials. In these forms, each question is supplied with a variable that looks something like this: PROJECT_formNN
Where NN is the question... (1 Reply)
i have something like this in a file called mysqldump.sql
--
-- Table structure for table `Table11`
--
DROP TABLE IF EXISTS `Table11`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `Table11` (
`id` int(11) NOT NULL... (14 Replies)
I have a file with following data
<Field FieldName="CHCFA21_01_01" FieldType="Text">
<Output CapturedValue="">
<DataSource Name="" Value="" />
</Output>
</Field>
<Field FieldName="CHCFA21_01_02" FieldType="Date">
<Output CapturedValue="">
... (1 Reply)
Hi team,
Is it possible to display 2 lines after a particular pattern in a shell script. For example in a file which has the below contents.
Mummy
Daddy
Son
Daughter
Children
Aunty
Uncle
Grandma
Grandpa
Son
Father
Mother
Brother-in-law
I want to display 2 lines before and after... (1 Reply)
Hi,
I've written a script to search for an Oracle ORA- error on a log file, print that line and the .trc file associated with it as well as the dateline of when I assumed the error occured. In most it is the first dateline previous to the error.
Unfortunately, this is not a fool proof script.... (2 Replies)
Hi I need to grep for a patter and display all lines below the pattern.
For ex: say my file has the below lines
file1
file2
file3
file4
file5
I NEED to grep for patter file3 and display all lines below the pattern. do we have an option to get this data. Let me know if you require... (5 Replies)
Discussion started by: venkidhadha
5 Replies
LEARN ABOUT CENTOS
ddi_dma_nextseg
ddi_dma_nextseg(9F) Kernel Functions for Drivers ddi_dma_nextseg(9F)NAME
ddi_dma_nextseg - get next DMA segment
SYNOPSIS
#include <sys/ddi.h>
#include <sys/sunddi.h>
int ddi_dma_nextseg(ddi_dma_win_t win, ddi_dma_seg_t seg, ddi_dma_seg_t *nseg);
INTERFACE LEVEL
This interface is obsolete. ddi_dma_nextcookie(9F) should be used instead.
PARAMETERS
win A DMA window.
seg The current DMA segment or NULL.
nseg A pointer to the next DMA segment to be filled in. If seg is NULL, a pointer to the first segment within the specified win-
dow is returned.
DESCRIPTION
ddi_dma_nextseg() gets the next DMA segment within the specified window win. If the current segment is NULL, the first DMA segment within
the window is returned.
A DMA segment is always required for a DMA window. A DMA segment is a contiguous portion of a DMA window (see ddi_dma_nextwin(9F)) which
is entirely addressable by the device for a data transfer operation.
An example where multiple DMA segments are allocated is where the system does not contain DVMA capabilities and the object may be non-con-
tiguous. In this example the object will be broken into smaller contiguous DMA segments. Another example is where the device has an upper
limit on its transfer size (for example an 8-bit address register) and has expressed this in the DMA limit structure (see
ddi_dma_lim_sparc(9S) or ddi_dma_lim_x86(9S)). In this example the object will be broken into smaller addressable DMA segments.
RETURN VALUES
ddi_dma_nextseg() returns:
DDI_SUCCESS Successfully filled in the next segment pointer.
DDI_DMA_DONE There is no next segment. The current segment is the final segment within the specified window.
DDI_DMA_STALE win does not refer to the currently active window.
CONTEXT
ddi_dma_nextseg() can be called from user or interrupt context.
EXAMPLES
For an example, see ddi_dma_segtocookie(9F).
ATTRIBUTES
See attributes(5) for a description of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Stability Level |Obsolete |
+-----------------------------+-----------------------------+
SEE ALSO attributes(5), ddi_dma_addr_setup(9F), ddi_dma_buf_setup(9F), ddi_dma_nextcookie(9F), ddi_dma_nextwin(9F), ddi_dma_segtocookie(9F),
ddi_dma_sync(9F), ddi_dma_lim_sparc(9S), ddi_dma_lim_x86(9S), ddi_dma_req(9S)
Writing Device Drivers
SunOS 5.10 27 Sep 2002 ddi_dma_nextseg(9F)