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