I have the following code that finds all <p> </ p> within the label <TXT_accesp> </TXT_accesp> and delete them. This code does that, it works correctly:
find /home -type f -name "*.html" -exec \
sed -i '/\<TXT_accesp\>/,/\<\/TXT_accesp\>/s@</\?p>@@g' {} \;
The problem is that I need to add more labels. Now you must delete all <p> </ p> that is within <TXT_accesp> </TXT_accesp> or within <TXT_acceng> </TXT_acceng> but I can not join the regular expression OR, I get an error (that the command does not exist, as if badly done).
find /home -type f -name "*.html" -exec \
sed -i '/\<TXT_accesp\>/,/\<\/TXT_accesp\>\||\<TXT_acceng\>/,/\<\/TXT_acceng\>/s@</\?p>@@g' {} \;
seddoes not support alternation (OR or||) between ranges of lines. Some versions support extended regexes with alternation in the regex, but what you need here is two commands tosedwith the-eoption (for readability):You can collapse that onto one line; you should not do so.