On Sat, Sep 4, 2021 at 6:46 PM Davide Brini wrote: > > > (keeping the list in the loop) > > On Sat, 4 Sep 2021 17:43:27 +0200, Robert Spanjaard > wrote: > > > I'm not a regular sed user. I had an HMTL file that had about 70 list > > elements on a single line, and I wanted to change that. So I thought I'd > > use sed to change every occurence of "li>\n > > > sed 's/<\/li>
  • /<\/li>\n
  • /' list.html > formattedlist.html > > > > According to the manual, this should work. This is exactly what the > > manual tells me to do to replace *all* occurences in the file list.html. > > > > That is NOT a matter of interpretation. > > Since I foresee this rapidly becoming a sterile discussion, I'll only add > this: > > for files that do not have multiple occurrences of the same pattern on a > single line, the statement in the manual is correct. The only thing missing > is a note specifying just that. > > Good luck with your replacements. Thank you both. I have addressed this and some related (and unrelated things I noticed along the way) with the attached patch: