linux 中特殊字符 M-BM-的处理
001、
[root@PC1 test]# ls test.txt [root@PC1 test]# cat test.txt ## 测试数据 Abpink Jnzoar Bizxar Abcd [root@PC1 test]# cat -A test.txt ## 第三行出现特殊字符B-BM- Abpink$ Jnzoar$ BizxarM-BM- $ Abcd$
002、删除特殊字符M-BM-
[root@PC1 test]# ls test.txt [root@PC1 test]# cat -A test.txt Abpink$ Jnzoar$ BizxarM-BM- $ Abcd$ [root@PC1 test]# sed 's/\xc2\xa0/ /g' test.txt | cat -A ## 产出特殊字符M-BM-,还多出空格 Abpink$ Jnzoar$ Bizxar $ Abcd$ [root@PC1 test]# sed 's/\xc2\xa0/ /g' test.txt | sed 's/ $//g' | cat -A ## 删除空格 Abpink$ Jnzoar$ Bizxar$ Abcd$
分类:
linux shell
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 无需6万激活码!GitHub神秘组织3小时极速复刻Manus,手把手教你使用OpenManus搭建本
· C#/.NET/.NET Core优秀项目和框架2025年2月简报
· Manus爆火,是硬核还是营销?
· 终于写完轮子一部分:tcp代理 了,记录一下
· 【杭电多校比赛记录】2025“钉耙编程”中国大学生算法设计春季联赛(1)
2022-01-01 linux系统中如何精确匹配0
2022-01-01 ubuntu 编译报错 configure: error: You need zlib >= 1.2.3 to build bin/PopLDdecay
2022-01-01 Err:12 http://security.ubuntu.com/ubuntu focal-updates/main amd64 openjdk-11-jre-headless amd64 11.0.11+9-0ubuntu2~20.04 404 Not Found [IP: 91.189.88.152 80]
2021-01-01 python中删除字典的键值对
2021-01-01 python中清空字典
2021-01-01 python中由列表生成字典
2021-01-01 python中zip同时循环两个可迭代对象