03-22-2007
HI,
If you can use AWK then try this awk code
BEGIN{
COMMENT="TCSCMT* ";
}
{
if($0 ~ /^EVALUATE/)
{
printf("%s%s\n",COMMENT,$0);
getline;
while(1)
{
printf("%s%s\n",COMMENT,$0);
if($0 ~ /^END-EVALUATE/)
{
break;
}
getline;
}
}
else
{
printf("%s\n",$0);
}
}
END{
}
Thanks
Raghuram
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
i wanted to search between pattrens
so i used
awk /"EXEC CICS DELETEQ TS"/,/END-IF/
but the some change is
AAAAAAAA
EXEC CICS DELETEQ TS
IF .....
END-IF....
XXXXXx
XXX
IF (3 Replies)
Discussion started by: pbsrinivas
3 Replies
2. Shell Programming and Scripting
Hi Every One...
I wanted to inserted a line in between matched pattrens..
Ex...
InPut File..
WRITEQ
TS
**************************
aaaaaaaaaaaaaaaaaaaaaaaa
bbbbbbbbbbbbbbbbbbbbbbbb
cccccccccccccccccccccccc
SOME PATTREN's
RESP ( WS-RESP )
... (7 Replies)
Discussion started by: pbsrinivas
7 Replies
3. Shell Programming and Scripting
Hi have a lots of files with this type of code
Example--1
PROCEDURE DIVISION USING
AAA
BBB
CCC.
Example--2
PROCEDURE DIVISION
Some Commented Lines....
USING
AAA
BBB
CCC.
Example--3 (12 Replies)
Discussion started by: pbsrinivas
12 Replies
4. UNIX for Dummies Questions & Answers
I thought that set and setenv was easy enough to understand until I started experimenting.
I noticed the same problem in a previous thread, so I will use it as an example.
set command gave the following output:
argv ()
cwd /homes/e/ee325328/assignment.2
home /homes/e/ee325328
path ( a... (2 Replies)
Discussion started by: benwj
2 Replies
5. UNIX for Dummies Questions & Answers
Hi there,
I want to change from this permission -r-xr-xr-x to -r-xr-xr-- for a set of files under unix.
Can someone help me to go-about doing this in one shot.
Cheers,
RN (2 Replies)
Discussion started by: karthickrn
2 Replies
6. Solaris
dears
i am using solaris 10
i am facing a problem when i make setup for solaris i choose the country egypt and i select the language north america
but i forget to do that the i found the date Jun written in arabic
i want to change character set to written in english
-rw-r--r-- 1 root ... (4 Replies)
Discussion started by: hosney00ux
4 Replies
7. Shell Programming and Scripting
hey guys,
I tried searching but most 'search and replace' questions are related to one liners.
Say I have a file to be replaced that has the following:
$ cat testing.txt
TESTING
AAA
BBB
CCC
DDD
EEE
FFF
GGG
HHH
ENDTESTING
This is the input file: (3 Replies)
Discussion started by: DeuceLee
3 Replies
8. Shell Programming and Scripting
i have a huge script that i need to replace a bunch of lines in.
in that script, i have a chunk similar to:
JABABA=$(if ; then
echo afafafa
afafafafaf
afafafafe
fdfdfdfadfadl
fafafafkkkk
fi)
I would like to replace the above chunk with: (1 Reply)
Discussion started by: SkySmart
1 Replies
9. Red Hat
Hi all,
Does anyone know how to change PROC_MEM_RES?
We have a DB server with quite a few oracle instances (RAC) and we are getting critical alerts for PROC_MEM_RES.
Anyone know how to increase the current setting or what we should do about it?
Thanks in advance.
john (2 Replies)
Discussion started by: jonnyd
2 Replies
10. UNIX for Dummies Questions & Answers
Hi all,
I am trying to write a script for renaming some files and I can't understand how to replace a set of characters between delimiters with sed.
The current filename is:
<ID1>_<ID2>_<DATE>_<ID3>.PDF
And I need to get the following:
<ID1>_<ID2>_<DATE>_X01<ID2>.PDF
I have tried the... (5 Replies)
Discussion started by: bartleby
5 Replies
LEARN ABOUT DEBIAN
xml::smart::dtd
XML::Smart::DTD(3pm) User Contributed Perl Documentation XML::Smart::DTD(3pm)
NAME
XML::Smart::DTD - DTD parser for XML::Smart.
DESCRIPTION
This will parse DTD and provides methods to access the information stored in the DTD.
USAGE
use XML::Smart::DTD ;
my $dtd = XML::Smart::DTD->new('some.dtd') ;
if ( $dtd->child_exists('tag1','subtag1') ) {
...
}
use Data::Dumper ;
print Dumper( $dtd->tree ) ;
new
METHODS
attr_exists ( TAG , ATTR )
Return TRUE if the attribute exists in the element TAG.
child_exists ( TAG , CHILD )
Return TRUE if the child exists in the element TAG.
elem_exists ( TAG )
Return TRUE if the element TAG exists.
error
Return the error list.
get_attr_def ( TAG , ATTR )
Return the default value of an attribute
get_attr_type ( TAG , ATTR )
Return the attribute type.
get_attr_values ( TAG , ATTR )
Return the defined values of an attribute.
get_attrs ( TAG )
Return the attribute list of a element.
get_attrs_req ( TAG )
Return the required attribute list of a element.
get_childs ( TAG )
Return the child list of an element.
get_childs_req ( TAG )
Return the required child list of an element.
get_elem_opt ( TAG )
Return the occurrence option of an element:
! REQUIRED AND ONLY ONE MATCH
+ 1 or more
* 0 or more
? 0 or 1
get_elem_child_opt ( TAG , CHILD )
Same of get_elem_opt() but this element as a child of an element.
is_attr_fix ( TAG , ATTR )
Return TRUE if an attribute is FIXED.
is_attr_req ( TAG , ATTR )
Return TRUE if an attribute is REQUIRED.
is_elem_any ( TAG )
Return TRUE if an element is ANY.
is_elem_child_multi ( TAG , CHILD )
Return TRUE if an element can have multiple occurrences as a child of TAG.
is_elem_child_opt ( TAG , CHILD )
Return TRUE if an element is optional as a child of TAG.
is_elem_child_req ( TAG , CHILD )
Return TRUE if an element is optional as a child of TAG.
is_elem_child_uniq ( TAG , CHILD )
Return TRUE if an element is required and unique as a child of TAG.
is_elem_pcdata ( TAG )
Return TRUE if an element is PCDATA (have content).
is_elem_empty ( TAG )
Return TRUE if an element is EMPTY (doesn't have attributes, content or children).
is_elem_multi ( TAG )
Return TRUE if an element can have multiple occurrences globally.
is_elem_opt ( TAG )
Return TRUE if an element is optional globally.
is_elem_parent ( TAG , @PARENTS )
Return TRUE if the list of @PARENTS can be parent of element TAG.
is_elem_req
Return TRUE if an element is required globally.
is_elem_uniq
Return TRUE if an element is unique and required globally.
root
Return the root name of the DTD.
tree
Return the HASH tree of the DTD.
SEE ALSO
XML::Smart, XML::DTDParser.
AUTHOR
Graciliano M. P. <gm@virtuasites.com.br>
I will appreciate any type of feedback (include your opinions and/or suggestions). ;-P
THANKS
Thanks to Jenda@Krynicky.cz http://Jenda.Krynicky.cz that is the author of XML::DTDParser.
COPYRIGHT
The DTD parser was based on XML-DTDParser-1.7 by Jenda@Krynicky.cz http://Jenda.Krynicky.cz
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
perl v5.10.1 2004-09-01 XML::Smart::DTD(3pm)