Hi folks,
I'm trying to insert some text strings (defined from a variable, e.g, STRING="123XYZ-X") into the first two files of three. The 3rd is a simple locate and replace.
For example:
The X string is what I would like to insert for File1
File1:
AAAAAAAAAAAAAAAAAA
XXXXXXXXXXXXXXXXXXXXX
AAAAAAAAAAAAAAAAAAAAAAAAAXXXXXXXXXXXXXXXXXXXXXXXXXXXX
In file 2, I'd like to insert W and X
File2:
WAAAAAAAAAAAAAAAAAAAAAAAAAAAA
XXXXXXXXXXXXXXXXXXXXXXXXXXXXX
File3:
AAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAA
...
AAAA <---remove and replace with BBBBBB
CCCCCC
DDDDDD
I tried with both awk and "here document" with no success.
Thanks for your help in advance.
I'm trying to insert some text strings (defined from a variable, e.g, STRING="123XYZ-X") into the first two files of three. The 3rd is a simple locate and replace.
For example:
The X string is what I would like to insert for File1
File1:
AAAAAAAAAAAAAAAAAA
XXXXXXXXXXXXXXXXXXXXX
AAAAAAAAAAAAAAAAAAAAAAAAAXXXXXXXXXXXXXXXXXXXXXXXXXXXX
In file 2, I'd like to insert W and X
File2:
WAAAAAAAAAAAAAAAAAAAAAAAAAAAA
XXXXXXXXXXXXXXXXXXXXXXXXXXXXX
File3:
AAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAA
...
AAAA <---remove and replace with BBBBBB
CCCCCC
DDDDDD
I tried with both awk and "here document" with no success.
Thanks for your help in advance.