加入收藏 | 设为首页 | 会员中心 | 我要投稿 源码网 (https://www.900php.com/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 服务器 > 搭建环境 > Linux > 正文

linux – 用于正则表达式替换的Bash命令

发布时间:2021-03-05 23:14:13 所属栏目:Linux 来源:网络整理
导读:什么bash命令可以用于管道上的正则表达式替换? cat foo.txt | someprogram 解决方法 你可能想要 sed 's/exp1/exp2/g' foo.txt foo2.txt 阅读更多内容,请访问Sed tutorial,Another tutorial和A small tutorial at Linux HOWTOs

什么bash命令可以用于管道上的正则表达式替换?

cat foo.txt | someprogram

解决方法

你可能想要
sed 's/exp1/exp2/g' foo.txt > foo2.txt

阅读更多内容,请访问Sed tutorial,Another tutorial和A small tutorial at Linux HOWTOs

(编辑:源码网)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    热点阅读