I have a folder of ~100 .html files, each has an identical list of links to the others in a column (with nested lists and css hides) down the left side in the browser. I need to insert a new item into this list, and I'm accepting the risk that the insertion point in one or two files might not be the same line nr. To avoid the hassle of having to escape sensitive characters, I made a file new.txt containing (more or less)But I can't get sed to read the contents of new.txtwrites a backup file, and the text "/r new.txt" on a new line 188.writes a backup file, and the text "r new.txt" on a new line 188.
Obviously I'm missing something??
Code:
<li>Item<ul><li><a href="one.html">one</a></li><li><a href="two.html">two</a></li></ul></li>Code:
sed -i.bak '187a/r new.txt' test.htmlCode:
sed -i.bak '187a\r new.txt' test.htmlObviously I'm missing something??
Statistics: Posted by debbiethekiwi — 2026-01-03 00:30