我无法解决问题。我有一个包含电子邮件地址的文本。我需要这个文件来更改井号的地址。
例如:
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/