I have the following input file:
this is text
identifier {
item /directory/file_1234
some more text
item /directory/file_1234 other line text
identifier {
item /directory/98_76file
other line
I want to replace the stings item /directory/*, that come after the line identifier { with /directory/file_ABC
I tried
cat input | sed ':a;N;$!ba;s/ identifier {\n item \/directory\/.*$/ identifier {\n newitem \/directory2\/file_ABC/g'
but it erases the lines after the first occurrence
this is text
identifier {
newitem /directory2/file_ABC