You could write a simple awk programme to extract the bits you need.
It makes a few assumptions about your code (and that you have GNU awk) which might be wrong, but it works on the small sample you posted and thus might work across all of your input.
Hi
I am new to this forum.
I have few XML files and from each xml file I want to copy some specific 50 no of lines and copy them to some other file.
how to do that? pls help.. (5 Replies)
Hi,
There's an xml file produced from a front-end tool as shown below:
<INPUT DATABASE ="ORACLE" DBNAME ="UNIX" NAME ="FACT_TABLE" OWNERNAME ="DIPS">
<INPUTFIELD DATATYPE ="double" DEFAULTVALUE ="" DESCRIPTION ="" NAME ="STORE_KEY" PICTURETEXT ="" PORTTYPE ="INPUT" PRECISION ="15" SCALE... (6 Replies)
hi,
i need my bash script to find regex in xml file.. and comment 2 lines before and after the line that contains regex.. can't use # needs to be <!-- at the beginning and --> and the end of the comment.
so eg..
first block
<filter>
<filter-name>MyRegEx</filter-name>
... (11 Replies)
I tried searching the forums, but couldn't find anything relevant to my question.
I have an xml file like the following:
<topLevel numberBlock="BLOCK1">
<item="content1" title="Content 1">
<RefPath="path/to/file1.txt />
</item>
<item"content2" title="Content 2" >... (4 Replies)
Hi All,
I need to umcomment an XML block (if it's not already uncommented) in a shell script. There are several commented blocks in the file that need to remain commented out. The challenging part for me is that I need to match a comment on one line and an XML tag on the following line. Also,... (0 Replies)
I want to process a file block by block using sed, and if that block does not contain two patterns, then that complete block has to be printed.
See below for the example data.
................................server 1...............................
running process 1
running... (8 Replies)
I want to comment a block of code in xml. Note that the tags will be similar. In the below xml code, I want to block the listener block for com.pkg1.class2. How do i do it ?
Thanks in Advance
<listener>
<listener-class>com.pkg1.class1</listener-class>
</listener>
.........
<listener>... (4 Replies)
Hi everyone,
So i'm struggling with an xml (log file) where we get information about some devices, so the logfile is filled with multiple "blocks" like that.
Based on the <devId> i want to extract this part of the xml file. If possible I want it to have an script for this, cause we'll use... (5 Replies)
Discussion started by: Pouky
5 Replies
LEARN ABOUT SUNOS
allocb_tmpl
allocb_tmpl(9F) Kernel Functions for Drivers allocb_tmpl(9F)NAME
allocb_tmpl - allocate a message block using a template
SYNOPSIS
#include <sys/stream.h>
mblk_t *allocb_tmpl(size_t size, const mblk_t *tmpl);
INTERFACE LEVEL
Solaris DDI specific (Solaris DDI)
PARAMETERS
size The number of bytes in the message block.
tmpl The template message block.
DESCRIPTION
The allocb_tmpl() function tries to allocate a STREAMS message block using allocb(9F). If the allocation is successful, the db_type field
in the the data block structure (dblk_t, see datab(9S)), as well as some implementation-private data, are copied from the dblk_t associated
with tmpl.
allocb_tmpl() should be used when a new STREAMS message block is allocated. This block is then used to contain data derived from another
STREAMS message block. The original message is used as the tmpl argument.
RETURN VALUES
Upon success, allocb_tmpl() returns a pointer to the allocated message block of the same type as tmpl. On failure, allocb_tmpl() returns a
NULL pointer.
CONTEXT
allocb_tmpl() can be called from user or interrupt context.
SEE ALSO allocb(9F), datab(9S), msgb(9S)
Writing Device Drivers
STREAMS Programming Guide
SunOS 5.10 18 Feb 2003 allocb_tmpl(9F)