January 07, 2019 10:19 PM
1.1
Sub-step one-one.
replace data-highlight-colour="red" with style="background-color: rgb(174,214,241);"
while read a ; do echo ${a//data-highlight-colour="red"/style="background-color: rgb(174,214,241);"} ; done < 001.html > 001.html.t ; mv 001.html{.t,}
while read a ; do echo ${a//abc/XYZ} ; done < 001.html > 001.html.t ; mv 001.html{.t,}
sed -i -e 's/XYZ/123/g' 001.html
sed -i -e 's/data-highlight-colour="green"/style="background-color: rgb(174,214,241);"/g' 001.html
sed -i -e 's/data-highlight-colour="yellow"/style="background-color: rgb(249,231,159);"/g' 001.html
sed -i -e 's/data-highlight-colour="red"/style="background-color: rgb(245,183,177);"/g' 001.html
sed -i -e 's/data-highlight-colour="green"/style="background-color: rgb(171,235,198);"/g' 001.html
sed -i -e 's/data-highlight-colour="blue"/style="background-color: rgb(174,214,241);"/g' 001.html
sed -i -e 's/data-highlight-colour="grey"/style="background-color: rgb(247,247,247);"/g' 001.html
sed -i -e 's/data-highlight-colour="blue"/style="background-color: rgb(174,214,241);"/g;s/data-highlight-colour="grey"/style="background-color: rgb(247,247,247);"/g' 001.html
sed -i -e 's/data-highlight-colour="yellow"/style="background-color: rgb(249,231,159);"/g;s/data-highlight-colour="red"/style="background-color: rgb(245,183,177);"/g;s/data-highlight-colour="green"/style="background-color: rgb(171,235,198);"/g;s/data-highlight-colour="blue"/style="background-color: rgb(174,214,241);"/g;s/data-highlight-colour="grey"/style="background-color: rgb(247,247,247);"/g' 001.html
sed -i -e 's/data-highlight-colour="yellow"/style="background-color: rgb(249,231,159);"/g;s/data-highlight-colour="red"/style="background-color: rgb(245,183,177);"/g;s/data-highlight-colour="green"/style="background-color: rgb(171,235,198);"/g;s/data-highlight-colour="blue"/style="background-color: rgb(174,214,241);"/g;s/data-highlight-colour="grey"/style="background-color: rgb(247,247,247);"/g' 001.html