When you replace characters in text with SED, you accidentally add a Chinese double quotation mark when the character is added, and when the result is replaced, you cannot always replace it.
The file name is called A.txt and the text reads as follows:
"" https://www.baidu.com/
To replace the "", use the command sed-i ' s# "" # #g ' a.txt always replace, here you can see the two different double quotes, but it is not easy to notice in the shell, think of the need to escape the character, the use of escape characters do not.
Finally found that the double quotation marks in the command seem to be more straight than the station in the text content, suddenly, it is estimated that the English and Chinese quotation marks caused. Copy and paste the double quotation marks in the text into the command, and you are sure to replace it.
When there is a problem with symbols, pay attention to the differences between Chinese and English
This article is from the "Gan mu" blog, please be sure to keep this source http://ganmu.blog.51cto.com/9305511/1865131
Chinese and English double quotes in the shell