I am trying to search and replace a multi line pattern in a php file using awk.
The pattern starts with
<div id="navbar">
and ends with
</div>
and spans over an unknown number of lines.
I need the command to be a one liner.
I use the "record separator" like this :
thanks cfajohnson
indeed it isolates the right pattern.
But I need to replace the pattern with sub or gsub
and also to write to a file with the same name as the input file (but to avoid file cut due to buffer).
Do you know how to?
Do you think it would possible to pipe to this the results from a find command (find . -maxdepth 1 -type f -not \( -name "menu.php" \) -not \( -name "boutique_.php" \) -not \( -name "*connect*" \) -not \( -name "0sp*." \) -not \( -name "0en*." \) -name "event_*.php") and still work with the variables to avoid buffer issues ?