Question regarding awk or sed to find and replace a word in Solaris for Scripting
This is my first question at this forum. I am a newbie to shell scripting. I have any issue in finding a string and replacing it in shell scripting.
So here is my Text in the Input file and I have only one line in the file:
^^file=2013-03-26 13:08:01.214 04:00||^^header=64||2||AUE_SYSTEMBOOT||na||solaris-bsm-team2||2013-03-26 13:07:41.014 -04:00^^text=booting kernel^^header=54||2||AUE_init_solaris||na||solaris-bsm-team2||2013-03-26 13:08:01.675 -04:00^^text=booted^^return=success||0^^header=97||2||AUE_login||||solaris-bsm-team2||2013-03-26 13:08:19.811 -04:00^^subject=master||master||staff||master||staff||1166||2386485855||0 0 solaris-bsm-team2^^return=success||0
Now I need to replace all the occurrences of the string "^^header" and replace it with "\nheader" where \n is new line.
Can someone please help how to write it, so that i can use it as a part of my script.
Thanks in advance.
Last edited by karthik1asr; 03-29-2013 at 10:41 AM.
Reason: word change