I'd like to replace "Mh:####:Mh" by "Mh" in a text file,
where #### ranges from 0000 to 3451.
Would you give me some tips how to use sed command to achieve this goal?
For example, when I ran one command, sed 's/Mh/m/' Mh.txt > Mh_tr.txt, it worked.
However, not only when there are combination of special characters with numbers, but also when there exists a numerical variable, I have no idea about this.
Thank you in advance.
where #### ranges from 0000 to 3451.
Would you give me some tips how to use sed command to achieve this goal?
For example, when I ran one command, sed 's/Mh/m/' Mh.txt > Mh_tr.txt, it worked.
However, not only when there are combination of special characters with numbers, but also when there exists a numerical variable, I have no idea about this.
Thank you in advance.
Comment