I recently asked a question very similar to this one but failed to provide enough feedback for what would be a solution for this particular case. Opening this question with further information and context.
I have two files:
File1:
not_keyword: 'something'
keyword: 'condition'
another_not_keyword: 'something'
File2:
condition 1 condition 2 condition 3
I would like to find all occurrences of keyword
in File1 and replace its content (condition) with the content of File2.
Desired output in this case:
not_keyword: 'something'
keyword: 'condition 1 condition 2 condition 3'
another_not_keyword: 'something"
It's my intent to have the replacement happen in place (directly on the file itself). A solution using gawk was given, but unfortunately I can't use anything other than sed or awk.
file2
?