Good afternoon,
I'm trying to read from an X file and write to a Y file when a specific String appears. But I just want to do the inclusion once. Example I'm trying to do:
sed -i '/, pasta/r teste.txt' Report.html
This command is reading all strings, "folder," and it is including the contents of the test.txt file underneath. But I want to make it include only the first occurrence of the string, "folder". A command like:
sed -i '0,/, pasta/r teste.txt' Report.html
The syntax above is wrong, how would it be correct to include the contents of the file only in the first occurrence of the string, "folder"?