📌  相关文章
📜  linux 从文件中查找并删除 bom - Shell-Bash 代码示例

📅  最后修改于: 2022-03-11 14:50:17.906000             🧑  作者: Mango

代码示例4
sed '1s/^\xEF\xBB\xBF//' < orig.txt > new.txt
You can also overwrite the existing file with the -i option:

sed -i '1s/^\xEF\xBB\xBF//' orig.txt
If you are using the BSD version of sed (eg macOS) then you need to have bash do the escaping:

 sed $'1s/\xef\xbb\xbf//' < orig.txt > new.txt