gpt4 book ai didi

linux - 使用 sed、awk、grep 转换文本

转载 作者:太空宇宙 更新时间:2023-11-04 04:09:29 25 4
gpt4 key购买 nike

我无法解决问题。我有一个包含电子邮件地址的文本。我需要这个文件来更改井号的地址。

例如:

bla bla bla 示例{at 符号}gmail.com -> #######{at 符号}#####.###

最佳答案

您可以像这样使用 sed:

sed -r 's/(^| )[^ @]+@[^ ]+/\1#########@#####.###/g' file
Each message has exactly one header, which is structured into fields. #########@#####.### Each field has a name and a value. #########@#####.### RFC 5322 specifies the precise syntax #########@#####.### .

关于linux - 使用 sed、awk、grep 转换文本,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19821811/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com