Can U help me plzz....
Hi all,
I'm new a member.
I'm doing on linux.
I want to write a linux shell script to insert 2 lines in middle of a file.
My requirement is
***Serch for a line, then insert 2 lines after that line***
Ex:
I hav a file called abc.
******FileName: abc******
Bug:1000
Bug:1010
Bug:1020
Bug:1030
Bug:1040
Bug:1050
**************************
I want to insert following lines
Bug:1033
Bug:1039
Final o/p should be as
******FileName: abc******
Bug:1000
Bug:1010
Bug:1020
Bug:1030
Bug:1033
Bug:1039
Bug:1040
Bug:1050
*************************
First i need to search for line "Bug:1030", then i need to insert 2 new lines after that.
Already i written a perl script to do same. but i need shell script also.
Thanks,
Bhargav......
|