I asked this question before but don\'t think I really explained it properly based on the answers given.
I have a file named backup.xml that is 28,000 l
backup.xml
How about this:
awk '{print NR-1 ",/\\*\\*\\*/{s/\\*\\*\\*/" $0 "/}"}' list.txt > list.sed sed -f list.sed backup.xml
The first line used awk to make a list of search/replace commands based on the list, which is then executed on the next line via sed.
awk
sed