Insert a new value
Hi All,
MY requirement is, whenever i find key word as "SEVERITY" it has to check the next line and if next line is not "APPLICATION" then it has to insert the value as "APPLICATION".
can someone help me how we can do this using sed/awk/perl.
My text file looks like this:
SEVERITY
APPLICATION
MESSAGE
OBJECT
....
....
SEVERITY
NODENAME
TEXT
MESSAGE
.....
.....
SEVERITY
NODENAME
TEXT
MESSAGE
........
.......
SEVERITY
TEXT
MESSAGE
......
SEVERITY
NAME
TEXT
MESSAGE
Last edited by bnbhp0; 02-24-2012 at 07:23 AM.
|