加入收藏 | 设为首页 | 会员中心 | 我要投稿 51站长网 (https://www.51zhanzhang.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
站内搜索:
当前位置: 首页 > 服务器 > 安全 > 正文

linux下批量删除utf8 bom的实现方法

发布时间:2021-03-16 18:03:56 所属栏目:安全 来源:网络整理
导读:低版本的gcc编译包含bom的文件会报错 xxx.cpp:1: error: stray ‘357' in program xxx.cpp:1: error: stray ‘273' in program xxx.cpp:1: error: stray ‘277' in program 批量删除之 grep -rIlo $'^xEFxBBxBF' . | xargs sed --in-place -e 's/xef

低版本的gcc编译包含bom的文件会报错

xxx.cpp:1: error: stray ‘357' in program
xxx.cpp:1: error: stray ‘273' in program
xxx.cpp:1: error: stray ‘277' in program

批量删除之

grep -rIlo $'^xEFxBBxBF' . | xargs sed --in-place -e 's/xefxbbxbf//'

在文件末尾增加空白行

find . -name "*.h" | xargs sed --in-place -e '${G}'

以上这篇linux下批量删除utf8 bom的实现方法就是小编分享给大家的全部内容了,希望能给大家一个参考,也希望大家多多支持编程小技巧。

(编辑:ASP站长)

【免责声明】本站内容转载自互联网,其相关言论仅代表作者个人观点绝非权威,不代表本站立场。如您发现内容存在版权问题,请提交相关链接至邮箱:bqsm@foxmail.com,我们将及时予以处理。

    相关内容
    未处理完善
      无相关信息
    未处理完善