TYhis is what I want to do:
My first file has the following kind of entries
Ther are randomly distributed throughout the file.
Of course the file contains other entries besides the !! entries.
!!LDAP_PRIMARY_HOST_SSI!!
!!LDAP_PRIMARY_SSI!!
and so on... T
Now my second file is pretty similar expect it doesn't have any bang bang(!!).
So it has:
LDAP_PRIMARY_HOST_SSI
LDAP_PRIMARY_SSI
Now this is what I need to do. I need to find out all entries which have bang bang in front of the word and behind the word and then find the corresponding entries in the second file which do not have this !!. Then I need to take thes eentries without bang bang and put bang bang in front and back just like I have it in the first file. So my second file will become
!!LDAP_PRIMARY_HOST_SSI!!
!!LDAP_PRIMARY_SSI!!
How can I do this in awk...
My first file has the following kind of entries
Ther are randomly distributed throughout the file.
Of course the file contains other entries besides the !! entries.
!!LDAP_PRIMARY_HOST_SSI!!
!!LDAP_PRIMARY_SSI!!
and so on... T
Now my second file is pretty similar expect it doesn't have any bang bang(!!).
So it has:
LDAP_PRIMARY_HOST_SSI
LDAP_PRIMARY_SSI
Now this is what I need to do. I need to find out all entries which have bang bang in front of the word and behind the word and then find the corresponding entries in the second file which do not have this !!. Then I need to take thes eentries without bang bang and put bang bang in front and back just like I have it in the first file. So my second file will become
!!LDAP_PRIMARY_HOST_SSI!!
!!LDAP_PRIMARY_SSI!!
How can I do this in awk...